
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html><head><title>Python: module oauth2client.appengine</title>
</head><body bgcolor="#f0f0f8">

<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="heading">
<tr bgcolor="#7799ee">
<td valign=bottom>&nbsp;<br>
<font color="#ffffff" face="helvetica, arial">&nbsp;<br><big><big><strong><a href="oauth2client.html"><font color="#ffffff">oauth2client</font></a>.appengine</strong></big></big></font></td
><td align=right valign=bottom
><font color="#ffffff" face="helvetica, arial"><a href=".">index</a><br><a href="file:/home/jcgregorio/projects/apiclient-release/oauth2client/appengine.py">/home/jcgregorio/projects/apiclient-release/oauth2client/appengine.py</a></font></td></tr></table>
    <p><tt>Utilities&nbsp;for&nbsp;Google&nbsp;App&nbsp;Engine<br>
&nbsp;<br>
Utilities&nbsp;for&nbsp;making&nbsp;it&nbsp;easier&nbsp;to&nbsp;use&nbsp;OAuth&nbsp;2.0&nbsp;on&nbsp;Google&nbsp;App&nbsp;Engine.</tt></p>
<p>
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
<tr bgcolor="#aa55cc">
<td colspan=3 valign=bottom>&nbsp;<br>
<font color="#ffffff" face="helvetica, arial"><big><strong>Modules</strong></big></font></td></tr>
    
<tr><td bgcolor="#aa55cc"><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</tt></td><td>&nbsp;</td>
<td width="100%"><table width="100%" summary="list"><tr><td width="25%" valign=top><a href="google.appengine.api.app_identity.html">google.appengine.api.app_identity</a><br>
<a href="base64.html">base64</a><br>
<a href="oauth2client.clientsecrets.html">oauth2client.clientsecrets</a><br>
</td><td width="25%" valign=top><a href="google.appengine.ext.db.html">google.appengine.ext.db</a><br>
<a href="httplib2.html">httplib2</a><br>
<a href="logging.html">logging</a><br>
</td><td width="25%" valign=top><a href="google.appengine.api.memcache.html">google.appengine.api.memcache</a><br>
<a href="pickle.html">pickle</a><br>
<a href="json.html">json</a><br>
</td><td width="25%" valign=top><a href="time.html">time</a><br>
<a href="google.appengine.api.users.html">google.appengine.api.users</a><br>
<a href="google.appengine.ext.webapp.html">google.appengine.ext.webapp</a><br>
</td></tr></table></td></tr></table><p>
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
<tr bgcolor="#ee77aa">
<td colspan=3 valign=bottom>&nbsp;<br>
<font color="#ffffff" face="helvetica, arial"><big><strong>Classes</strong></big></font></td></tr>
    
<tr><td bgcolor="#ee77aa"><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</tt></td><td>&nbsp;</td>
<td width="100%"><dl>
<dt><font face="helvetica, arial"><a href="__builtin__.html#object">__builtin__.object</a>
</font></dt><dd>
<dl>
<dt><font face="helvetica, arial"><a href="oauth2client.appengine.html#OAuth2Decorator">OAuth2Decorator</a>
</font></dt><dd>
<dl>
<dt><font face="helvetica, arial"><a href="oauth2client.appengine.html#OAuth2DecoratorFromClientSecrets">OAuth2DecoratorFromClientSecrets</a>
</font></dt></dl>
</dd>
</dl>
</dd>
<dt><font face="helvetica, arial"><a href="exceptions.html#Exception">exceptions.Exception</a>(<a href="exceptions.html#BaseException">exceptions.BaseException</a>)
</font></dt><dd>
<dl>
<dt><font face="helvetica, arial"><a href="oauth2client.appengine.html#InvalidClientSecretsError">InvalidClientSecretsError</a>
</font></dt></dl>
</dd>
<dt><font face="helvetica, arial"><a href="google.appengine.ext.db.html#Model">google.appengine.ext.db.Model</a>(<a href="__builtin__.html#object">__builtin__.object</a>)
</font></dt><dd>
<dl>
<dt><font face="helvetica, arial"><a href="oauth2client.appengine.html#CredentialsModel">CredentialsModel</a>
</font></dt></dl>
</dd>
<dt><font face="helvetica, arial"><a href="google.appengine.ext.db.html#Property">google.appengine.ext.db.Property</a>(<a href="__builtin__.html#object">__builtin__.object</a>)
</font></dt><dd>
<dl>
<dt><font face="helvetica, arial"><a href="oauth2client.appengine.html#CredentialsProperty">CredentialsProperty</a>
</font></dt><dt><font face="helvetica, arial"><a href="oauth2client.appengine.html#FlowProperty">FlowProperty</a>
</font></dt></dl>
</dd>
<dt><font face="helvetica, arial"><a href="google.appengine.ext.webapp._webapp25.html#RequestHandler">google.appengine.ext.webapp._webapp25.RequestHandler</a>(<a href="__builtin__.html#object">__builtin__.object</a>)
</font></dt><dd>
<dl>
<dt><font face="helvetica, arial"><a href="oauth2client.appengine.html#OAuth2Handler">OAuth2Handler</a>
</font></dt></dl>
</dd>
<dt><font face="helvetica, arial"><a href="oauth2client.client.html#AssertionCredentials">oauth2client.client.AssertionCredentials</a>(<a href="oauth2client.client.html#OAuth2Credentials">oauth2client.client.OAuth2Credentials</a>)
</font></dt><dd>
<dl>
<dt><font face="helvetica, arial"><a href="oauth2client.appengine.html#AppAssertionCredentials">AppAssertionCredentials</a>
</font></dt></dl>
</dd>
<dt><font face="helvetica, arial"><a href="oauth2client.client.html#Storage">oauth2client.client.Storage</a>(<a href="__builtin__.html#object">__builtin__.object</a>)
</font></dt><dd>
<dl>
<dt><font face="helvetica, arial"><a href="oauth2client.appengine.html#StorageByKeyName">StorageByKeyName</a>
</font></dt></dl>
</dd>
</dl>
 <p>
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
<tr bgcolor="#ffc8d8">
<td colspan=3 valign=bottom>&nbsp;<br>
<font color="#000000" face="helvetica, arial"><a name="AppAssertionCredentials">class <strong>AppAssertionCredentials</strong></a>(<a href="oauth2client.client.html#AssertionCredentials">oauth2client.client.AssertionCredentials</a>)</font></td></tr>
    
<tr bgcolor="#ffc8d8"><td rowspan=2><tt>&nbsp;&nbsp;&nbsp;</tt></td>
<td colspan=2><tt>Credentials&nbsp;<a href="__builtin__.html#object">object</a>&nbsp;for&nbsp;App&nbsp;Engine&nbsp;Assertion&nbsp;Grants<br>
&nbsp;<br>
This&nbsp;<a href="__builtin__.html#object">object</a>&nbsp;will&nbsp;allow&nbsp;an&nbsp;App&nbsp;Engine&nbsp;application&nbsp;to&nbsp;identify&nbsp;itself&nbsp;to&nbsp;Google<br>
and&nbsp;other&nbsp;OAuth&nbsp;2.0&nbsp;servers&nbsp;that&nbsp;can&nbsp;verify&nbsp;assertions.&nbsp;It&nbsp;can&nbsp;be&nbsp;used&nbsp;for<br>
the&nbsp;purpose&nbsp;of&nbsp;accessing&nbsp;data&nbsp;stored&nbsp;under&nbsp;an&nbsp;account&nbsp;assigned&nbsp;to&nbsp;the&nbsp;App<br>
Engine&nbsp;application&nbsp;itself.<br>
&nbsp;<br>
This&nbsp;credential&nbsp;does&nbsp;not&nbsp;require&nbsp;a&nbsp;flow&nbsp;to&nbsp;instantiate&nbsp;because&nbsp;it&nbsp;represents<br>
a&nbsp;two&nbsp;legged&nbsp;flow,&nbsp;and&nbsp;therefore&nbsp;has&nbsp;all&nbsp;of&nbsp;the&nbsp;required&nbsp;information&nbsp;to<br>
generate&nbsp;and&nbsp;refresh&nbsp;its&nbsp;own&nbsp;access&nbsp;tokens.<br>&nbsp;</tt></td></tr>
<tr><td>&nbsp;</td>
<td width="100%"><dl><dt>Method resolution order:</dt>
<dd><a href="oauth2client.appengine.html#AppAssertionCredentials">AppAssertionCredentials</a></dd>
<dd><a href="oauth2client.client.html#AssertionCredentials">oauth2client.client.AssertionCredentials</a></dd>
<dd><a href="oauth2client.client.html#OAuth2Credentials">oauth2client.client.OAuth2Credentials</a></dd>
<dd><a href="oauth2client.client.html#Credentials">oauth2client.client.Credentials</a></dd>
<dd><a href="__builtin__.html#object">__builtin__.object</a></dd>
</dl>
<hr>
Methods defined here:<br>
<dl><dt><a name="AppAssertionCredentials-__init__"><strong>__init__</strong></a>(self, scope, **kwargs)</dt><dd><tt>Constructor&nbsp;for&nbsp;<a href="#AppAssertionCredentials">AppAssertionCredentials</a><br>
&nbsp;<br>
Args:<br>
&nbsp;&nbsp;scope:&nbsp;string&nbsp;or&nbsp;list&nbsp;of&nbsp;strings,&nbsp;scope(s)&nbsp;of&nbsp;the&nbsp;credentials&nbsp;being&nbsp;requested.</tt></dd></dl>

<hr>
Class methods defined here:<br>
<dl><dt><a name="AppAssertionCredentials-from_json"><strong>from_json</strong></a>(cls, json)<font color="#909090"><font face="helvetica, arial"> from <a href="__builtin__.html#type">__builtin__.type</a></font></font></dt></dl>

<hr>
Methods inherited from <a href="oauth2client.client.html#OAuth2Credentials">oauth2client.client.OAuth2Credentials</a>:<br>
<dl><dt><a name="AppAssertionCredentials-__getstate__"><strong>__getstate__</strong></a>(self)</dt><dd><tt>Trim&nbsp;the&nbsp;state&nbsp;down&nbsp;to&nbsp;something&nbsp;that&nbsp;can&nbsp;be&nbsp;pickled.</tt></dd></dl>

<dl><dt><a name="AppAssertionCredentials-__setstate__"><strong>__setstate__</strong></a>(self, state)</dt><dd><tt>Reconstitute&nbsp;the&nbsp;state&nbsp;of&nbsp;the&nbsp;<a href="__builtin__.html#object">object</a>&nbsp;from&nbsp;being&nbsp;pickled.</tt></dd></dl>

<dl><dt><a name="AppAssertionCredentials-apply"><strong>apply</strong></a>(self, headers)</dt><dd><tt>Add&nbsp;the&nbsp;authorization&nbsp;to&nbsp;the&nbsp;headers.<br>
&nbsp;<br>
Args:<br>
&nbsp;&nbsp;headers:&nbsp;dict,&nbsp;the&nbsp;headers&nbsp;to&nbsp;add&nbsp;the&nbsp;Authorization&nbsp;header&nbsp;to.</tt></dd></dl>

<dl><dt><a name="AppAssertionCredentials-authorize"><strong>authorize</strong></a>(self, http)</dt><dd><tt>Authorize&nbsp;an&nbsp;httplib2.Http&nbsp;instance&nbsp;with&nbsp;these&nbsp;credentials.<br>
&nbsp;<br>
The&nbsp;modified&nbsp;http.request&nbsp;method&nbsp;will&nbsp;add&nbsp;authentication&nbsp;headers&nbsp;to&nbsp;each<br>
request&nbsp;and&nbsp;will&nbsp;refresh&nbsp;access_tokens&nbsp;when&nbsp;a&nbsp;401&nbsp;is&nbsp;received&nbsp;on&nbsp;a<br>
request.&nbsp;In&nbsp;addition&nbsp;the&nbsp;http.request&nbsp;method&nbsp;has&nbsp;a&nbsp;credentials&nbsp;property,<br>
http.request.credentials,&nbsp;which&nbsp;is&nbsp;the&nbsp;Credentials&nbsp;<a href="__builtin__.html#object">object</a>&nbsp;that&nbsp;authorized<br>
it.<br>
&nbsp;<br>
Args:<br>
&nbsp;&nbsp;&nbsp;http:&nbsp;An&nbsp;instance&nbsp;of&nbsp;httplib2.Http<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;or&nbsp;something&nbsp;that&nbsp;acts&nbsp;like&nbsp;it.<br>
&nbsp;<br>
Returns:<br>
&nbsp;&nbsp;&nbsp;A&nbsp;modified&nbsp;instance&nbsp;of&nbsp;http&nbsp;that&nbsp;was&nbsp;passed&nbsp;in.<br>
&nbsp;<br>
Example:<br>
&nbsp;<br>
&nbsp;&nbsp;h&nbsp;=&nbsp;httplib2.Http()<br>
&nbsp;&nbsp;h&nbsp;=&nbsp;credentials.<a href="#AppAssertionCredentials-authorize">authorize</a>(h)<br>
&nbsp;<br>
You&nbsp;can't&nbsp;create&nbsp;a&nbsp;new&nbsp;OAuth&nbsp;subclass&nbsp;of&nbsp;httplib2.Authenication<br>
because&nbsp;it&nbsp;never&nbsp;gets&nbsp;passed&nbsp;the&nbsp;absolute&nbsp;URI,&nbsp;which&nbsp;is&nbsp;needed&nbsp;for<br>
signing.&nbsp;So&nbsp;instead&nbsp;we&nbsp;have&nbsp;to&nbsp;overload&nbsp;'request'&nbsp;with&nbsp;a&nbsp;closure<br>
that&nbsp;adds&nbsp;in&nbsp;the&nbsp;Authorization&nbsp;header&nbsp;and&nbsp;then&nbsp;calls&nbsp;the&nbsp;original<br>
version&nbsp;of&nbsp;'request()'.</tt></dd></dl>

<dl><dt><a name="AppAssertionCredentials-refresh"><strong>refresh</strong></a>(self, http)</dt><dd><tt>Forces&nbsp;a&nbsp;refresh&nbsp;of&nbsp;the&nbsp;access_token.<br>
&nbsp;<br>
Args:<br>
&nbsp;&nbsp;http:&nbsp;httplib2.Http,&nbsp;an&nbsp;http&nbsp;<a href="__builtin__.html#object">object</a>&nbsp;to&nbsp;be&nbsp;used&nbsp;to&nbsp;make&nbsp;the&nbsp;refresh<br>
&nbsp;&nbsp;&nbsp;&nbsp;request.</tt></dd></dl>

<dl><dt><a name="AppAssertionCredentials-set_store"><strong>set_store</strong></a>(self, store)</dt><dd><tt>Set&nbsp;the&nbsp;<a href="oauth2client.client.html#Storage">Storage</a>&nbsp;for&nbsp;the&nbsp;credential.<br>
&nbsp;<br>
Args:<br>
&nbsp;&nbsp;store:&nbsp;<a href="oauth2client.client.html#Storage">Storage</a>,&nbsp;an&nbsp;implementation&nbsp;of&nbsp;Stroage&nbsp;<a href="__builtin__.html#object">object</a>.<br>
&nbsp;&nbsp;&nbsp;&nbsp;This&nbsp;is&nbsp;needed&nbsp;to&nbsp;store&nbsp;the&nbsp;latest&nbsp;access_token&nbsp;if&nbsp;it<br>
&nbsp;&nbsp;&nbsp;&nbsp;has&nbsp;expired&nbsp;and&nbsp;been&nbsp;refreshed.&nbsp;&nbsp;This&nbsp;implementation&nbsp;uses<br>
&nbsp;&nbsp;&nbsp;&nbsp;locking&nbsp;to&nbsp;check&nbsp;for&nbsp;updates&nbsp;before&nbsp;updating&nbsp;the<br>
&nbsp;&nbsp;&nbsp;&nbsp;access_token.</tt></dd></dl>

<dl><dt><a name="AppAssertionCredentials-to_json"><strong>to_json</strong></a>(self)</dt></dl>

<hr>
Data descriptors inherited from <a href="oauth2client.client.html#OAuth2Credentials">oauth2client.client.OAuth2Credentials</a>:<br>
<dl><dt><strong>access_token_expired</strong></dt>
<dd><tt>True&nbsp;if&nbsp;the&nbsp;credential&nbsp;is&nbsp;expired&nbsp;or&nbsp;invalid.<br>
&nbsp;<br>
If&nbsp;the&nbsp;token_expiry&nbsp;isn't&nbsp;set,&nbsp;we&nbsp;assume&nbsp;the&nbsp;token&nbsp;doesn't&nbsp;expire.</tt></dd>
</dl>
<hr>
Class methods inherited from <a href="oauth2client.client.html#Credentials">oauth2client.client.Credentials</a>:<br>
<dl><dt><a name="AppAssertionCredentials-new_from_json"><strong>new_from_json</strong></a>(cls, s)<font color="#909090"><font face="helvetica, arial"> from <a href="__builtin__.html#type">__builtin__.type</a></font></font></dt><dd><tt>Utility&nbsp;class&nbsp;method&nbsp;to&nbsp;instantiate&nbsp;a&nbsp;Credentials&nbsp;subclass&nbsp;from&nbsp;a&nbsp;JSON<br>
representation&nbsp;produced&nbsp;by&nbsp;<a href="#AppAssertionCredentials-to_json">to_json</a>().<br>
&nbsp;<br>
Args:<br>
&nbsp;&nbsp;s:&nbsp;string,&nbsp;JSON&nbsp;from&nbsp;<a href="#AppAssertionCredentials-to_json">to_json</a>().<br>
&nbsp;<br>
Returns:<br>
&nbsp;&nbsp;An&nbsp;instance&nbsp;of&nbsp;the&nbsp;subclass&nbsp;of&nbsp;Credentials&nbsp;that&nbsp;was&nbsp;serialized&nbsp;with<br>
&nbsp;&nbsp;<a href="#AppAssertionCredentials-to_json">to_json</a>().</tt></dd></dl>

<hr>
Data descriptors inherited from <a href="oauth2client.client.html#Credentials">oauth2client.client.Credentials</a>:<br>
<dl><dt><strong>__dict__</strong></dt>
<dd><tt>dictionary&nbsp;for&nbsp;instance&nbsp;variables&nbsp;(if&nbsp;defined)</tt></dd>
</dl>
<dl><dt><strong>__weakref__</strong></dt>
<dd><tt>list&nbsp;of&nbsp;weak&nbsp;references&nbsp;to&nbsp;the&nbsp;object&nbsp;(if&nbsp;defined)</tt></dd>
</dl>
<hr>
Data and other attributes inherited from <a href="oauth2client.client.html#Credentials">oauth2client.client.Credentials</a>:<br>
<dl><dt><strong>NON_SERIALIZED_MEMBERS</strong> = ['store']</dl>

</td></tr></table> <p>
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
<tr bgcolor="#ffc8d8">
<td colspan=3 valign=bottom>&nbsp;<br>
<font color="#000000" face="helvetica, arial"><a name="CredentialsModel">class <strong>CredentialsModel</strong></a>(<a href="google.appengine.ext.db.html#Model">google.appengine.ext.db.Model</a>)</font></td></tr>
    
<tr bgcolor="#ffc8d8"><td rowspan=2><tt>&nbsp;&nbsp;&nbsp;</tt></td>
<td colspan=2><tt><a href="oauth2client.client.html#Storage">Storage</a>&nbsp;for&nbsp;OAuth&nbsp;2.0&nbsp;Credentials<br>
&nbsp;<br>
<a href="oauth2client.client.html#Storage">Storage</a>&nbsp;of&nbsp;the&nbsp;model&nbsp;is&nbsp;keyed&nbsp;by&nbsp;the&nbsp;user.user_id().<br>&nbsp;</tt></td></tr>
<tr><td>&nbsp;</td>
<td width="100%"><dl><dt>Method resolution order:</dt>
<dd><a href="oauth2client.appengine.html#CredentialsModel">CredentialsModel</a></dd>
<dd><a href="google.appengine.ext.db.html#Model">google.appengine.ext.db.Model</a></dd>
<dd><a href="__builtin__.html#object">__builtin__.object</a></dd>
</dl>
<hr>
Data descriptors defined here:<br>
<dl><dt><strong>credentials</strong></dt>
<dd><tt>App&nbsp;Engine&nbsp;datastore&nbsp;Property&nbsp;for&nbsp;Credentials.<br>
&nbsp;<br>
Utility&nbsp;property&nbsp;that&nbsp;allows&nbsp;easy&nbsp;storage&nbsp;and&nbsp;retrieval&nbsp;of<br>
oath2client.Credentials</tt></dd>
</dl>
<hr>
Methods inherited from <a href="google.appengine.ext.db.html#Model">google.appengine.ext.db.Model</a>:<br>
<dl><dt><a name="CredentialsModel-__init__"><strong>__init__</strong></a>(self, parent<font color="#909090">=None</font>, key_name<font color="#909090">=None</font>, _app<font color="#909090">=None</font>, _from_entity<font color="#909090">=False</font>, **kwds)</dt><dd><tt>Creates&nbsp;a&nbsp;new&nbsp;instance&nbsp;of&nbsp;this&nbsp;model.<br>
&nbsp;<br>
To&nbsp;create&nbsp;a&nbsp;new&nbsp;entity,&nbsp;you&nbsp;instantiate&nbsp;a&nbsp;model&nbsp;and&nbsp;then&nbsp;call&nbsp;<a href="#CredentialsModel-put">put</a>(),<br>
which&nbsp;saves&nbsp;the&nbsp;entity&nbsp;to&nbsp;the&nbsp;datastore:<br>
&nbsp;<br>
&nbsp;&nbsp;&nbsp;person&nbsp;=&nbsp;Person()<br>
&nbsp;&nbsp;&nbsp;person.name&nbsp;=&nbsp;'Bret'<br>
&nbsp;&nbsp;&nbsp;person.<a href="#CredentialsModel-put">put</a>()<br>
&nbsp;<br>
You&nbsp;can&nbsp;initialize&nbsp;properties&nbsp;in&nbsp;the&nbsp;model&nbsp;in&nbsp;the&nbsp;constructor&nbsp;with&nbsp;keyword<br>
arguments:<br>
&nbsp;<br>
&nbsp;&nbsp;&nbsp;person&nbsp;=&nbsp;Person(name='Bret')<br>
&nbsp;<br>
We&nbsp;initialize&nbsp;all&nbsp;other&nbsp;properties&nbsp;to&nbsp;the&nbsp;default&nbsp;value&nbsp;(as&nbsp;defined&nbsp;by&nbsp;the<br>
properties&nbsp;in&nbsp;the&nbsp;model&nbsp;definition)&nbsp;if&nbsp;they&nbsp;are&nbsp;not&nbsp;provided&nbsp;in&nbsp;the<br>
constructor.<br>
&nbsp;<br>
Args:<br>
&nbsp;&nbsp;parent:&nbsp;Parent&nbsp;instance&nbsp;for&nbsp;this&nbsp;instance&nbsp;or&nbsp;None,&nbsp;indicating&nbsp;a&nbsp;top-<br>
&nbsp;&nbsp;&nbsp;&nbsp;level&nbsp;instance.<br>
&nbsp;&nbsp;key_name:&nbsp;Name&nbsp;for&nbsp;new&nbsp;model&nbsp;instance.<br>
&nbsp;&nbsp;_from_entity:&nbsp;Intentionally&nbsp;undocumented.<br>
&nbsp;&nbsp;kwds:&nbsp;Keyword&nbsp;arguments&nbsp;mapping&nbsp;to&nbsp;properties&nbsp;of&nbsp;model.&nbsp;&nbsp;Also:<br>
&nbsp;&nbsp;&nbsp;&nbsp;key:&nbsp;Key&nbsp;instance&nbsp;for&nbsp;this&nbsp;instance,&nbsp;if&nbsp;provided&nbsp;makes&nbsp;parent&nbsp;and<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;key_name&nbsp;redundant&nbsp;(they&nbsp;do&nbsp;not&nbsp;need&nbsp;to&nbsp;be&nbsp;set&nbsp;but&nbsp;if&nbsp;they&nbsp;are<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;they&nbsp;must&nbsp;match&nbsp;the&nbsp;key).</tt></dd></dl>

<dl><dt><a name="CredentialsModel-delete"><strong>delete</strong></a>(self, **kwargs)</dt><dd><tt>Deletes&nbsp;this&nbsp;entity&nbsp;from&nbsp;the&nbsp;datastore.<br>
&nbsp;<br>
Args:<br>
&nbsp;&nbsp;config:&nbsp;datastore_rpc.Configuration&nbsp;to&nbsp;use&nbsp;for&nbsp;this&nbsp;request.<br>
&nbsp;<br>
Raises:<br>
&nbsp;&nbsp;TransactionFailedError&nbsp;if&nbsp;the&nbsp;data&nbsp;could&nbsp;not&nbsp;be&nbsp;committed.</tt></dd></dl>

<dl><dt><a name="CredentialsModel-dynamic_properties"><strong>dynamic_properties</strong></a>(self)</dt><dd><tt>Returns&nbsp;a&nbsp;list&nbsp;of&nbsp;all&nbsp;dynamic&nbsp;properties&nbsp;defined&nbsp;for&nbsp;instance.</tt></dd></dl>

<dl><dt><a name="CredentialsModel-has_key"><strong>has_key</strong></a>(self)</dt><dd><tt>Determine&nbsp;if&nbsp;this&nbsp;model&nbsp;instance&nbsp;has&nbsp;a&nbsp;complete&nbsp;key.<br>
&nbsp;<br>
When&nbsp;not&nbsp;using&nbsp;a&nbsp;fully&nbsp;self-assigned&nbsp;Key,&nbsp;ids&nbsp;are&nbsp;not&nbsp;assigned&nbsp;until&nbsp;the<br>
data&nbsp;is&nbsp;saved&nbsp;to&nbsp;the&nbsp;Datastore,&nbsp;but&nbsp;instances&nbsp;with&nbsp;a&nbsp;key&nbsp;name&nbsp;always&nbsp;have<br>
a&nbsp;full&nbsp;key.<br>
&nbsp;<br>
Returns:<br>
&nbsp;&nbsp;True&nbsp;if&nbsp;the&nbsp;<a href="__builtin__.html#object">object</a>&nbsp;has&nbsp;been&nbsp;persisted&nbsp;to&nbsp;the&nbsp;datastore&nbsp;or&nbsp;has&nbsp;a&nbsp;key<br>
&nbsp;&nbsp;or&nbsp;has&nbsp;a&nbsp;key_name,&nbsp;otherwise&nbsp;False.</tt></dd></dl>

<dl><dt><a name="CredentialsModel-instance_properties"><strong>instance_properties</strong></a>(self)</dt><dd><tt>Alias&nbsp;for&nbsp;dyanmic_properties.</tt></dd></dl>

<dl><dt><a name="CredentialsModel-is_saved"><strong>is_saved</strong></a>(self)</dt><dd><tt>Determine&nbsp;if&nbsp;entity&nbsp;is&nbsp;persisted&nbsp;in&nbsp;the&nbsp;datastore.<br>
&nbsp;<br>
New&nbsp;instances&nbsp;of&nbsp;<a href="google.appengine.ext.db.html#Model">Model</a>&nbsp;do&nbsp;not&nbsp;start&nbsp;out&nbsp;saved&nbsp;in&nbsp;the&nbsp;data.&nbsp;&nbsp;Objects&nbsp;which<br>
are&nbsp;saved&nbsp;to&nbsp;or&nbsp;loaded&nbsp;from&nbsp;the&nbsp;Datastore&nbsp;will&nbsp;have&nbsp;a&nbsp;True&nbsp;saved&nbsp;state.<br>
&nbsp;<br>
Returns:<br>
&nbsp;&nbsp;True&nbsp;if&nbsp;<a href="__builtin__.html#object">object</a>&nbsp;has&nbsp;been&nbsp;persisted&nbsp;to&nbsp;the&nbsp;datastore,&nbsp;otherwise&nbsp;False.</tt></dd></dl>

<dl><dt><a name="CredentialsModel-key"><strong>key</strong></a>(self)</dt><dd><tt>Unique&nbsp;key&nbsp;for&nbsp;this&nbsp;entity.<br>
&nbsp;<br>
This&nbsp;property&nbsp;is&nbsp;only&nbsp;available&nbsp;if&nbsp;this&nbsp;entity&nbsp;is&nbsp;already&nbsp;stored&nbsp;in&nbsp;the<br>
datastore&nbsp;or&nbsp;if&nbsp;it&nbsp;has&nbsp;a&nbsp;full&nbsp;key,&nbsp;so&nbsp;it&nbsp;is&nbsp;available&nbsp;if&nbsp;this&nbsp;entity&nbsp;was<br>
fetched&nbsp;returned&nbsp;from&nbsp;a&nbsp;query,&nbsp;or&nbsp;after&nbsp;<a href="#CredentialsModel-put">put</a>()&nbsp;is&nbsp;called&nbsp;the&nbsp;first&nbsp;time<br>
for&nbsp;new&nbsp;entities,&nbsp;or&nbsp;if&nbsp;a&nbsp;complete&nbsp;key&nbsp;was&nbsp;given&nbsp;when&nbsp;constructed.<br>
&nbsp;<br>
Returns:<br>
&nbsp;&nbsp;Datastore&nbsp;key&nbsp;of&nbsp;persisted&nbsp;entity.<br>
&nbsp;<br>
Raises:<br>
&nbsp;&nbsp;NotSavedError&nbsp;when&nbsp;entity&nbsp;is&nbsp;not&nbsp;persistent.</tt></dd></dl>

<dl><dt><a name="CredentialsModel-parent"><strong>parent</strong></a>(self)</dt><dd><tt>Get&nbsp;the&nbsp;parent&nbsp;of&nbsp;the&nbsp;model&nbsp;instance.<br>
&nbsp;<br>
Returns:<br>
&nbsp;&nbsp;Parent&nbsp;of&nbsp;contained&nbsp;entity&nbsp;or&nbsp;parent&nbsp;provided&nbsp;in&nbsp;constructor,&nbsp;None&nbsp;if<br>
&nbsp;&nbsp;instance&nbsp;has&nbsp;no&nbsp;parent.</tt></dd></dl>

<dl><dt><a name="CredentialsModel-parent_key"><strong>parent_key</strong></a>(self)</dt><dd><tt>Get&nbsp;the&nbsp;parent's&nbsp;key.<br>
&nbsp;<br>
This&nbsp;method&nbsp;is&nbsp;useful&nbsp;for&nbsp;avoiding&nbsp;a&nbsp;potential&nbsp;fetch&nbsp;from&nbsp;the&nbsp;datastore<br>
but&nbsp;still&nbsp;get&nbsp;information&nbsp;about&nbsp;the&nbsp;instances&nbsp;parent.<br>
&nbsp;<br>
Returns:<br>
&nbsp;&nbsp;Parent&nbsp;key&nbsp;of&nbsp;entity,&nbsp;None&nbsp;if&nbsp;there&nbsp;is&nbsp;no&nbsp;parent.</tt></dd></dl>

<dl><dt><a name="CredentialsModel-put"><strong>put</strong></a>(self, **kwargs)</dt><dd><tt>Writes&nbsp;this&nbsp;model&nbsp;instance&nbsp;to&nbsp;the&nbsp;datastore.<br>
&nbsp;<br>
If&nbsp;this&nbsp;instance&nbsp;is&nbsp;new,&nbsp;we&nbsp;add&nbsp;an&nbsp;entity&nbsp;to&nbsp;the&nbsp;datastore.<br>
Otherwise,&nbsp;we&nbsp;update&nbsp;this&nbsp;instance,&nbsp;and&nbsp;the&nbsp;key&nbsp;will&nbsp;remain&nbsp;the<br>
same.<br>
&nbsp;<br>
Args:<br>
&nbsp;&nbsp;config:&nbsp;datastore_rpc.Configuration&nbsp;to&nbsp;use&nbsp;for&nbsp;this&nbsp;request.<br>
&nbsp;<br>
Returns:<br>
&nbsp;&nbsp;The&nbsp;key&nbsp;of&nbsp;the&nbsp;instance&nbsp;(either&nbsp;the&nbsp;existing&nbsp;key&nbsp;or&nbsp;a&nbsp;new&nbsp;key).<br>
&nbsp;<br>
Raises:<br>
&nbsp;&nbsp;TransactionFailedError&nbsp;if&nbsp;the&nbsp;data&nbsp;could&nbsp;not&nbsp;be&nbsp;committed.</tt></dd></dl>

<dl><dt><a name="CredentialsModel-save"><strong>save</strong></a> = put(self, **kwargs)</dt><dd><tt>Writes&nbsp;this&nbsp;model&nbsp;instance&nbsp;to&nbsp;the&nbsp;datastore.<br>
&nbsp;<br>
If&nbsp;this&nbsp;instance&nbsp;is&nbsp;new,&nbsp;we&nbsp;add&nbsp;an&nbsp;entity&nbsp;to&nbsp;the&nbsp;datastore.<br>
Otherwise,&nbsp;we&nbsp;update&nbsp;this&nbsp;instance,&nbsp;and&nbsp;the&nbsp;key&nbsp;will&nbsp;remain&nbsp;the<br>
same.<br>
&nbsp;<br>
Args:<br>
&nbsp;&nbsp;config:&nbsp;datastore_rpc.Configuration&nbsp;to&nbsp;use&nbsp;for&nbsp;this&nbsp;request.<br>
&nbsp;<br>
Returns:<br>
&nbsp;&nbsp;The&nbsp;key&nbsp;of&nbsp;the&nbsp;instance&nbsp;(either&nbsp;the&nbsp;existing&nbsp;key&nbsp;or&nbsp;a&nbsp;new&nbsp;key).<br>
&nbsp;<br>
Raises:<br>
&nbsp;&nbsp;TransactionFailedError&nbsp;if&nbsp;the&nbsp;data&nbsp;could&nbsp;not&nbsp;be&nbsp;committed.</tt></dd></dl>

<dl><dt><a name="CredentialsModel-to_xml"><strong>to_xml</strong></a>(self, _entity_class<font color="#909090">=&lt;class 'google.appengine.api.datastore.Entity'&gt;</font>)</dt><dd><tt>Generate&nbsp;an&nbsp;XML&nbsp;representation&nbsp;of&nbsp;this&nbsp;model&nbsp;instance.<br>
&nbsp;<br>
atom&nbsp;and&nbsp;gd:namespace&nbsp;properties&nbsp;are&nbsp;converted&nbsp;to&nbsp;XML&nbsp;according&nbsp;to&nbsp;their<br>
respective&nbsp;schemas.&nbsp;For&nbsp;more&nbsp;information,&nbsp;see:<br>
&nbsp;<br>
&nbsp;&nbsp;<a href="http://www.atomenabled.org/developers/syndication/">http://www.atomenabled.org/developers/syndication/</a><br>
&nbsp;&nbsp;<a href="http://code.google.com/apis/gdata/common-elements.html">http://code.google.com/apis/gdata/common-elements.html</a></tt></dd></dl>

<hr>
Class methods inherited from <a href="google.appengine.ext.db.html#Model">google.appengine.ext.db.Model</a>:<br>
<dl><dt><a name="CredentialsModel-all"><strong>all</strong></a>(cls, **kwds)<font color="#909090"><font face="helvetica, arial"> from <a href="google.appengine.ext.db.html#PropertiedClass">google.appengine.ext.db.PropertiedClass</a></font></font></dt><dd><tt>Returns&nbsp;a&nbsp;query&nbsp;over&nbsp;all&nbsp;instances&nbsp;of&nbsp;this&nbsp;model&nbsp;from&nbsp;the&nbsp;datastore.<br>
&nbsp;<br>
Returns:<br>
&nbsp;&nbsp;Query&nbsp;that&nbsp;will&nbsp;retrieve&nbsp;all&nbsp;instances&nbsp;from&nbsp;entity&nbsp;collection.</tt></dd></dl>

<dl><dt><a name="CredentialsModel-entity_type"><strong>entity_type</strong></a>(cls)<font color="#909090"><font face="helvetica, arial"> from <a href="google.appengine.ext.db.html#PropertiedClass">google.appengine.ext.db.PropertiedClass</a></font></font></dt><dd><tt>Soon&nbsp;to&nbsp;be&nbsp;removed&nbsp;alias&nbsp;for&nbsp;kind.</tt></dd></dl>

<dl><dt><a name="CredentialsModel-fields"><strong>fields</strong></a>(cls)<font color="#909090"><font face="helvetica, arial"> from <a href="google.appengine.ext.db.html#PropertiedClass">google.appengine.ext.db.PropertiedClass</a></font></font></dt><dd><tt>Soon&nbsp;to&nbsp;be&nbsp;removed&nbsp;alias&nbsp;for&nbsp;properties.</tt></dd></dl>

<dl><dt><a name="CredentialsModel-from_entity"><strong>from_entity</strong></a>(cls, entity)<font color="#909090"><font face="helvetica, arial"> from <a href="google.appengine.ext.db.html#PropertiedClass">google.appengine.ext.db.PropertiedClass</a></font></font></dt><dd><tt>Converts&nbsp;the&nbsp;entity&nbsp;representation&nbsp;of&nbsp;this&nbsp;model&nbsp;to&nbsp;an&nbsp;instance.<br>
&nbsp;<br>
Converts&nbsp;datastore.Entity&nbsp;instance&nbsp;to&nbsp;an&nbsp;instance&nbsp;of&nbsp;cls.<br>
&nbsp;<br>
Args:<br>
&nbsp;&nbsp;entity:&nbsp;Entity&nbsp;loaded&nbsp;directly&nbsp;from&nbsp;datastore.<br>
&nbsp;<br>
Raises:<br>
&nbsp;&nbsp;KindError&nbsp;when&nbsp;cls&nbsp;is&nbsp;incorrect&nbsp;model&nbsp;for&nbsp;entity.</tt></dd></dl>

<dl><dt><a name="CredentialsModel-get"><strong>get</strong></a>(cls, keys, **kwargs)<font color="#909090"><font face="helvetica, arial"> from <a href="google.appengine.ext.db.html#PropertiedClass">google.appengine.ext.db.PropertiedClass</a></font></font></dt><dd><tt>Fetch&nbsp;instance&nbsp;from&nbsp;the&nbsp;datastore&nbsp;of&nbsp;a&nbsp;specific&nbsp;<a href="google.appengine.ext.db.html#Model">Model</a>&nbsp;type&nbsp;using&nbsp;key.<br>
&nbsp;<br>
We&nbsp;support&nbsp;Key&nbsp;objects&nbsp;and&nbsp;string&nbsp;keys&nbsp;(we&nbsp;convert&nbsp;them&nbsp;to&nbsp;Key&nbsp;objects<br>
automatically).<br>
&nbsp;<br>
Useful&nbsp;for&nbsp;ensuring&nbsp;that&nbsp;specific&nbsp;instance&nbsp;types&nbsp;are&nbsp;retrieved&nbsp;from&nbsp;the<br>
datastore.&nbsp;&nbsp;It&nbsp;also&nbsp;helps&nbsp;that&nbsp;the&nbsp;source&nbsp;code&nbsp;clearly&nbsp;indicates&nbsp;what<br>
kind&nbsp;of&nbsp;<a href="__builtin__.html#object">object</a>&nbsp;is&nbsp;being&nbsp;retreived.&nbsp;&nbsp;Example:<br>
&nbsp;<br>
&nbsp;&nbsp;story&nbsp;=&nbsp;Story.<a href="#CredentialsModel-get">get</a>(story_key)<br>
&nbsp;<br>
Args:<br>
&nbsp;&nbsp;keys:&nbsp;Key&nbsp;within&nbsp;datastore&nbsp;entity&nbsp;collection&nbsp;to&nbsp;find;&nbsp;or&nbsp;string&nbsp;key;<br>
&nbsp;&nbsp;&nbsp;&nbsp;or&nbsp;list&nbsp;of&nbsp;Keys&nbsp;or&nbsp;string&nbsp;keys.<br>
&nbsp;&nbsp;config:&nbsp;datastore_rpc.Configuration&nbsp;to&nbsp;use&nbsp;for&nbsp;this&nbsp;request.<br>
&nbsp;<br>
Returns:<br>
&nbsp;&nbsp;If&nbsp;a&nbsp;single&nbsp;key&nbsp;was&nbsp;given:&nbsp;a&nbsp;<a href="google.appengine.ext.db.html#Model">Model</a>&nbsp;instance&nbsp;associated&nbsp;with&nbsp;key<br>
&nbsp;&nbsp;for&nbsp;provided&nbsp;class&nbsp;if&nbsp;it&nbsp;exists&nbsp;in&nbsp;the&nbsp;datastore,&nbsp;otherwise<br>
&nbsp;&nbsp;None;&nbsp;if&nbsp;a&nbsp;list&nbsp;of&nbsp;keys&nbsp;was&nbsp;given:&nbsp;a&nbsp;list&nbsp;whose&nbsp;items&nbsp;are&nbsp;either<br>
&nbsp;&nbsp;a&nbsp;<a href="google.appengine.ext.db.html#Model">Model</a>&nbsp;instance&nbsp;or&nbsp;None.<br>
&nbsp;<br>
Raises:<br>
&nbsp;&nbsp;KindError&nbsp;if&nbsp;any&nbsp;of&nbsp;the&nbsp;retreived&nbsp;objects&nbsp;are&nbsp;not&nbsp;instances&nbsp;of&nbsp;the<br>
&nbsp;&nbsp;type&nbsp;associated&nbsp;with&nbsp;call&nbsp;to&nbsp;'get'.</tt></dd></dl>

<dl><dt><a name="CredentialsModel-get_by_id"><strong>get_by_id</strong></a>(cls, ids, parent<font color="#909090">=None</font>, **kwargs)<font color="#909090"><font face="helvetica, arial"> from <a href="google.appengine.ext.db.html#PropertiedClass">google.appengine.ext.db.PropertiedClass</a></font></font></dt><dd><tt>Get&nbsp;instance&nbsp;of&nbsp;<a href="google.appengine.ext.db.html#Model">Model</a>&nbsp;class&nbsp;by&nbsp;id.<br>
&nbsp;<br>
Args:<br>
&nbsp;&nbsp;key_names:&nbsp;A&nbsp;single&nbsp;id&nbsp;or&nbsp;a&nbsp;list&nbsp;of&nbsp;ids.<br>
&nbsp;&nbsp;parent:&nbsp;Parent&nbsp;of&nbsp;instances&nbsp;to&nbsp;get.&nbsp;&nbsp;Can&nbsp;be&nbsp;a&nbsp;model&nbsp;or&nbsp;key.<br>
&nbsp;&nbsp;config:&nbsp;datastore_rpc.Configuration&nbsp;to&nbsp;use&nbsp;for&nbsp;this&nbsp;request.</tt></dd></dl>

<dl><dt><a name="CredentialsModel-get_by_key_name"><strong>get_by_key_name</strong></a>(cls, key_names, parent<font color="#909090">=None</font>, **kwargs)<font color="#909090"><font face="helvetica, arial"> from <a href="google.appengine.ext.db.html#PropertiedClass">google.appengine.ext.db.PropertiedClass</a></font></font></dt><dd><tt>Get&nbsp;instance&nbsp;of&nbsp;<a href="google.appengine.ext.db.html#Model">Model</a>&nbsp;class&nbsp;by&nbsp;its&nbsp;key's&nbsp;name.<br>
&nbsp;<br>
Args:<br>
&nbsp;&nbsp;key_names:&nbsp;A&nbsp;single&nbsp;key-name&nbsp;or&nbsp;a&nbsp;list&nbsp;of&nbsp;key-names.<br>
&nbsp;&nbsp;parent:&nbsp;Parent&nbsp;of&nbsp;instances&nbsp;to&nbsp;get.&nbsp;&nbsp;Can&nbsp;be&nbsp;a&nbsp;model&nbsp;or&nbsp;key.<br>
&nbsp;&nbsp;config:&nbsp;datastore_rpc.Configuration&nbsp;to&nbsp;use&nbsp;for&nbsp;this&nbsp;request.</tt></dd></dl>

<dl><dt><a name="CredentialsModel-get_or_insert"><strong>get_or_insert</strong></a>(cls, key_name, **kwds)<font color="#909090"><font face="helvetica, arial"> from <a href="google.appengine.ext.db.html#PropertiedClass">google.appengine.ext.db.PropertiedClass</a></font></font></dt><dd><tt>Transactionally&nbsp;retrieve&nbsp;or&nbsp;create&nbsp;an&nbsp;instance&nbsp;of&nbsp;<a href="google.appengine.ext.db.html#Model">Model</a>&nbsp;class.<br>
&nbsp;<br>
This&nbsp;acts&nbsp;much&nbsp;like&nbsp;the&nbsp;Python&nbsp;dictionary&nbsp;setdefault()&nbsp;method,&nbsp;where&nbsp;we<br>
first&nbsp;try&nbsp;to&nbsp;retrieve&nbsp;a&nbsp;<a href="google.appengine.ext.db.html#Model">Model</a>&nbsp;instance&nbsp;with&nbsp;the&nbsp;given&nbsp;key&nbsp;name&nbsp;and&nbsp;parent.<br>
If&nbsp;it's&nbsp;not&nbsp;present,&nbsp;then&nbsp;we&nbsp;create&nbsp;a&nbsp;new&nbsp;instance&nbsp;(using&nbsp;the&nbsp;*kwds<br>
supplied)&nbsp;and&nbsp;insert&nbsp;that&nbsp;with&nbsp;the&nbsp;supplied&nbsp;key&nbsp;name.<br>
&nbsp;<br>
Subsequent&nbsp;calls&nbsp;to&nbsp;this&nbsp;method&nbsp;with&nbsp;the&nbsp;same&nbsp;key_name&nbsp;and&nbsp;parent&nbsp;will<br>
always&nbsp;yield&nbsp;the&nbsp;same&nbsp;entity&nbsp;(though&nbsp;not&nbsp;the&nbsp;same&nbsp;actual&nbsp;<a href="__builtin__.html#object">object</a>&nbsp;instance),<br>
regardless&nbsp;of&nbsp;the&nbsp;*kwds&nbsp;supplied.&nbsp;If&nbsp;the&nbsp;specified&nbsp;entity&nbsp;has&nbsp;somehow<br>
been&nbsp;deleted&nbsp;separately,&nbsp;then&nbsp;the&nbsp;next&nbsp;call&nbsp;will&nbsp;create&nbsp;a&nbsp;new&nbsp;entity&nbsp;and<br>
return&nbsp;it.<br>
&nbsp;<br>
If&nbsp;the&nbsp;'parent'&nbsp;keyword&nbsp;argument&nbsp;is&nbsp;supplied,&nbsp;it&nbsp;must&nbsp;be&nbsp;a&nbsp;<a href="google.appengine.ext.db.html#Model">Model</a>&nbsp;instance.<br>
It&nbsp;will&nbsp;be&nbsp;used&nbsp;as&nbsp;the&nbsp;parent&nbsp;of&nbsp;the&nbsp;new&nbsp;instance&nbsp;of&nbsp;this&nbsp;<a href="google.appengine.ext.db.html#Model">Model</a>&nbsp;class&nbsp;if<br>
one&nbsp;is&nbsp;created.<br>
&nbsp;<br>
This&nbsp;method&nbsp;is&nbsp;especially&nbsp;useful&nbsp;for&nbsp;having&nbsp;just&nbsp;one&nbsp;unique&nbsp;entity&nbsp;for<br>
a&nbsp;specific&nbsp;identifier.&nbsp;Insertion/retrieval&nbsp;is&nbsp;done&nbsp;transactionally,&nbsp;which<br>
guarantees&nbsp;uniqueness.<br>
&nbsp;<br>
Example&nbsp;usage:<br>
&nbsp;<br>
&nbsp;&nbsp;class&nbsp;WikiTopic(db.<a href="google.appengine.ext.db.html#Model">Model</a>):<br>
&nbsp;&nbsp;&nbsp;&nbsp;creation_date&nbsp;=&nbsp;db.DatetimeProperty(auto_now_add=True)<br>
&nbsp;&nbsp;&nbsp;&nbsp;body&nbsp;=&nbsp;db.TextProperty(required=True)<br>
&nbsp;<br>
&nbsp;&nbsp;#&nbsp;The&nbsp;first&nbsp;time&nbsp;through&nbsp;we'll&nbsp;create&nbsp;the&nbsp;new&nbsp;topic.<br>
&nbsp;&nbsp;wiki_word&nbsp;=&nbsp;'CommonIdioms'<br>
&nbsp;&nbsp;topic&nbsp;=&nbsp;WikiTopic.<a href="#CredentialsModel-get_or_insert">get_or_insert</a>(wiki_word,<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;body='This&nbsp;topic&nbsp;is&nbsp;totally&nbsp;new!')<br>
&nbsp;&nbsp;assert&nbsp;topic.<a href="#CredentialsModel-key">key</a>().name()&nbsp;==&nbsp;'CommonIdioms'<br>
&nbsp;&nbsp;assert&nbsp;topic.body&nbsp;==&nbsp;'This&nbsp;topic&nbsp;is&nbsp;totally&nbsp;new!'<br>
&nbsp;<br>
&nbsp;&nbsp;#&nbsp;The&nbsp;second&nbsp;time&nbsp;through&nbsp;will&nbsp;just&nbsp;retrieve&nbsp;the&nbsp;entity.<br>
&nbsp;&nbsp;overwrite_topic&nbsp;=&nbsp;WikiTopic.<a href="#CredentialsModel-get_or_insert">get_or_insert</a>(wiki_word,<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;body='A&nbsp;totally&nbsp;different&nbsp;message!')<br>
&nbsp;&nbsp;assert&nbsp;topic.<a href="#CredentialsModel-key">key</a>().name()&nbsp;==&nbsp;'CommonIdioms'<br>
&nbsp;&nbsp;assert&nbsp;topic.body&nbsp;==&nbsp;'This&nbsp;topic&nbsp;is&nbsp;totally&nbsp;new!'<br>
&nbsp;<br>
Args:<br>
&nbsp;&nbsp;key_name:&nbsp;Key&nbsp;name&nbsp;to&nbsp;retrieve&nbsp;or&nbsp;create.<br>
&nbsp;&nbsp;**kwds:&nbsp;Keyword&nbsp;arguments&nbsp;to&nbsp;pass&nbsp;to&nbsp;the&nbsp;constructor&nbsp;of&nbsp;the&nbsp;model&nbsp;class<br>
&nbsp;&nbsp;&nbsp;&nbsp;if&nbsp;an&nbsp;instance&nbsp;for&nbsp;the&nbsp;specified&nbsp;key&nbsp;name&nbsp;does&nbsp;not&nbsp;already&nbsp;exist.&nbsp;If<br>
&nbsp;&nbsp;&nbsp;&nbsp;an&nbsp;instance&nbsp;with&nbsp;the&nbsp;supplied&nbsp;key_name&nbsp;and&nbsp;parent&nbsp;already&nbsp;exists,&nbsp;the<br>
&nbsp;&nbsp;&nbsp;&nbsp;rest&nbsp;of&nbsp;these&nbsp;arguments&nbsp;will&nbsp;be&nbsp;discarded.<br>
&nbsp;<br>
Returns:<br>
&nbsp;&nbsp;Existing&nbsp;instance&nbsp;of&nbsp;<a href="google.appengine.ext.db.html#Model">Model</a>&nbsp;class&nbsp;with&nbsp;the&nbsp;specified&nbsp;key_name&nbsp;and&nbsp;parent<br>
&nbsp;&nbsp;or&nbsp;a&nbsp;new&nbsp;one&nbsp;that&nbsp;has&nbsp;just&nbsp;been&nbsp;created.<br>
&nbsp;<br>
Raises:<br>
&nbsp;&nbsp;TransactionFailedError&nbsp;if&nbsp;the&nbsp;specified&nbsp;<a href="google.appengine.ext.db.html#Model">Model</a>&nbsp;instance&nbsp;could&nbsp;not&nbsp;be<br>
&nbsp;&nbsp;retrieved&nbsp;or&nbsp;created&nbsp;transactionally&nbsp;(due&nbsp;to&nbsp;high&nbsp;contention,&nbsp;etc).</tt></dd></dl>

<dl><dt><a name="CredentialsModel-gql"><strong>gql</strong></a>(cls, query_string, *args, **kwds)<font color="#909090"><font face="helvetica, arial"> from <a href="google.appengine.ext.db.html#PropertiedClass">google.appengine.ext.db.PropertiedClass</a></font></font></dt><dd><tt>Returns&nbsp;a&nbsp;query&nbsp;using&nbsp;GQL&nbsp;query&nbsp;string.<br>
&nbsp;<br>
See&nbsp;appengine/ext/gql&nbsp;for&nbsp;more&nbsp;information&nbsp;about&nbsp;GQL.<br>
&nbsp;<br>
Args:<br>
&nbsp;&nbsp;query_string:&nbsp;properly&nbsp;formatted&nbsp;GQL&nbsp;query&nbsp;string&nbsp;with&nbsp;the<br>
&nbsp;&nbsp;&nbsp;&nbsp;'SELECT&nbsp;*&nbsp;FROM&nbsp;&lt;entity&gt;'&nbsp;part&nbsp;omitted<br>
&nbsp;&nbsp;*args:&nbsp;rest&nbsp;of&nbsp;the&nbsp;positional&nbsp;arguments&nbsp;used&nbsp;to&nbsp;bind&nbsp;numeric&nbsp;references<br>
&nbsp;&nbsp;&nbsp;&nbsp;in&nbsp;the&nbsp;query.<br>
&nbsp;&nbsp;**kwds:&nbsp;dictionary-based&nbsp;arguments&nbsp;(for&nbsp;named&nbsp;parameters).</tt></dd></dl>

<dl><dt><a name="CredentialsModel-kind"><strong>kind</strong></a>(cls)<font color="#909090"><font face="helvetica, arial"> from <a href="google.appengine.ext.db.html#PropertiedClass">google.appengine.ext.db.PropertiedClass</a></font></font></dt><dd><tt>Returns&nbsp;the&nbsp;datastore&nbsp;kind&nbsp;we&nbsp;use&nbsp;for&nbsp;this&nbsp;model.<br>
&nbsp;<br>
We&nbsp;just&nbsp;use&nbsp;the&nbsp;name&nbsp;of&nbsp;the&nbsp;model&nbsp;for&nbsp;now,&nbsp;ignoring&nbsp;potential&nbsp;collisions.</tt></dd></dl>

<dl><dt><a name="CredentialsModel-properties"><strong>properties</strong></a>(cls)<font color="#909090"><font face="helvetica, arial"> from <a href="google.appengine.ext.db.html#PropertiedClass">google.appengine.ext.db.PropertiedClass</a></font></font></dt><dd><tt>Returns&nbsp;a&nbsp;dictionary&nbsp;of&nbsp;all&nbsp;the&nbsp;properties&nbsp;defined&nbsp;for&nbsp;this&nbsp;model.</tt></dd></dl>

<hr>
Static methods inherited from <a href="google.appengine.ext.db.html#Model">google.appengine.ext.db.Model</a>:<br>
<dl><dt><a name="CredentialsModel-__new__"><strong>__new__</strong></a>(*args, **unused_kwds)</dt><dd><tt>Allow&nbsp;subclasses&nbsp;to&nbsp;call&nbsp;<a href="#CredentialsModel-__new__">__new__</a>()&nbsp;with&nbsp;arguments.<br>
&nbsp;<br>
Do&nbsp;NOT&nbsp;list&nbsp;'cls'&nbsp;as&nbsp;the&nbsp;first&nbsp;argument,&nbsp;or&nbsp;in&nbsp;the&nbsp;case&nbsp;when<br>
the&nbsp;'unused_kwds'&nbsp;dictionary&nbsp;contains&nbsp;the&nbsp;key&nbsp;'cls',&nbsp;the&nbsp;function<br>
will&nbsp;complain&nbsp;about&nbsp;multiple&nbsp;argument&nbsp;values&nbsp;for&nbsp;'cls'.<br>
&nbsp;<br>
Raises:<br>
&nbsp;&nbsp;TypeError&nbsp;if&nbsp;there&nbsp;are&nbsp;no&nbsp;positional&nbsp;arguments.</tt></dd></dl>

<hr>
Data descriptors inherited from <a href="google.appengine.ext.db.html#Model">google.appengine.ext.db.Model</a>:<br>
<dl><dt><strong>__dict__</strong></dt>
<dd><tt>dictionary&nbsp;for&nbsp;instance&nbsp;variables&nbsp;(if&nbsp;defined)</tt></dd>
</dl>
<dl><dt><strong>__weakref__</strong></dt>
<dd><tt>list&nbsp;of&nbsp;weak&nbsp;references&nbsp;to&nbsp;the&nbsp;object&nbsp;(if&nbsp;defined)</tt></dd>
</dl>
<hr>
Data and other attributes inherited from <a href="google.appengine.ext.db.html#Model">google.appengine.ext.db.Model</a>:<br>
<dl><dt><strong>__metaclass__</strong> = &lt;class 'google.appengine.ext.db.PropertiedClass'&gt;<dd><tt>Meta-class&nbsp;for&nbsp;initializing&nbsp;<a href="google.appengine.ext.db.html#Model">Model</a>&nbsp;classes&nbsp;properties.<br>
&nbsp;<br>
Used&nbsp;for&nbsp;initializing&nbsp;Properties&nbsp;defined&nbsp;in&nbsp;the&nbsp;context&nbsp;of&nbsp;a&nbsp;model.<br>
By&nbsp;using&nbsp;a&nbsp;meta-class&nbsp;much&nbsp;of&nbsp;the&nbsp;configuration&nbsp;of&nbsp;a&nbsp;<a href="google.appengine.ext.db.html#Property">Property</a><br>
descriptor&nbsp;becomes&nbsp;implicit.&nbsp;&nbsp;By&nbsp;using&nbsp;this&nbsp;meta-class,&nbsp;descriptors<br>
that&nbsp;are&nbsp;of&nbsp;class&nbsp;<a href="google.appengine.ext.db.html#Model">Model</a>&nbsp;are&nbsp;notified&nbsp;about&nbsp;which&nbsp;class&nbsp;they<br>
belong&nbsp;to&nbsp;and&nbsp;what&nbsp;attribute&nbsp;they&nbsp;are&nbsp;associated&nbsp;with&nbsp;and&nbsp;can<br>
do&nbsp;appropriate&nbsp;initialization&nbsp;via&nbsp;__property_config__.<br>
&nbsp;<br>
Duplicate&nbsp;properties&nbsp;are&nbsp;not&nbsp;permitted.</tt></dl>

</td></tr></table> <p>
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
<tr bgcolor="#ffc8d8">
<td colspan=3 valign=bottom>&nbsp;<br>
<font color="#000000" face="helvetica, arial"><a name="CredentialsProperty">class <strong>CredentialsProperty</strong></a>(<a href="google.appengine.ext.db.html#Property">google.appengine.ext.db.Property</a>)</font></td></tr>
    
<tr bgcolor="#ffc8d8"><td rowspan=2><tt>&nbsp;&nbsp;&nbsp;</tt></td>
<td colspan=2><tt>App&nbsp;Engine&nbsp;datastore&nbsp;<a href="google.appengine.ext.db.html#Property">Property</a>&nbsp;for&nbsp;Credentials.<br>
&nbsp;<br>
Utility&nbsp;property&nbsp;that&nbsp;allows&nbsp;easy&nbsp;storage&nbsp;and&nbsp;retrieval&nbsp;of<br>
oath2client.Credentials<br>&nbsp;</tt></td></tr>
<tr><td>&nbsp;</td>
<td width="100%"><dl><dt>Method resolution order:</dt>
<dd><a href="oauth2client.appengine.html#CredentialsProperty">CredentialsProperty</a></dd>
<dd><a href="google.appengine.ext.db.html#Property">google.appengine.ext.db.Property</a></dd>
<dd><a href="__builtin__.html#object">__builtin__.object</a></dd>
</dl>
<hr>
Methods defined here:<br>
<dl><dt><a name="CredentialsProperty-get_value_for_datastore"><strong>get_value_for_datastore</strong></a>(self, model_instance)</dt><dd><tt>#&nbsp;For&nbsp;writing&nbsp;to&nbsp;datastore.</tt></dd></dl>

<dl><dt><a name="CredentialsProperty-make_value_from_datastore"><strong>make_value_from_datastore</strong></a>(self, value)</dt><dd><tt>#&nbsp;For&nbsp;reading&nbsp;from&nbsp;datastore.</tt></dd></dl>

<dl><dt><a name="CredentialsProperty-validate"><strong>validate</strong></a>(self, value)</dt></dl>

<hr>
Data and other attributes defined here:<br>
<dl><dt><strong>data_type</strong> = &lt;class 'oauth2client.client.Credentials'&gt;<dd><tt>Base&nbsp;class&nbsp;for&nbsp;all&nbsp;Credentials&nbsp;objects.<br>
&nbsp;<br>
Subclasses&nbsp;must&nbsp;define&nbsp;an&nbsp;authorize()&nbsp;method&nbsp;that&nbsp;applies&nbsp;the&nbsp;credentials&nbsp;to<br>
an&nbsp;HTTP&nbsp;transport.<br>
&nbsp;<br>
Subclasses&nbsp;must&nbsp;also&nbsp;specify&nbsp;a&nbsp;classmethod&nbsp;named&nbsp;'from_json'&nbsp;that&nbsp;takes&nbsp;a&nbsp;JSON<br>
string&nbsp;as&nbsp;input&nbsp;and&nbsp;returns&nbsp;an&nbsp;instaniated&nbsp;Credentials&nbsp;<a href="__builtin__.html#object">object</a>.</tt></dl>

<hr>
Methods inherited from <a href="google.appengine.ext.db.html#Property">google.appengine.ext.db.Property</a>:<br>
<dl><dt><a name="CredentialsProperty-__get__"><strong>__get__</strong></a>(self, model_instance, model_class)</dt><dd><tt>Returns&nbsp;the&nbsp;value&nbsp;for&nbsp;this&nbsp;property&nbsp;on&nbsp;the&nbsp;given&nbsp;model&nbsp;instance.<br>
&nbsp;<br>
See&nbsp;<a href="http://docs.python.org/ref/descriptors.html">http://docs.python.org/ref/descriptors.html</a>&nbsp;for&nbsp;a&nbsp;description&nbsp;of<br>
the&nbsp;arguments&nbsp;to&nbsp;this&nbsp;class&nbsp;and&nbsp;what&nbsp;they&nbsp;mean.</tt></dd></dl>

<dl><dt><a name="CredentialsProperty-__init__"><strong>__init__</strong></a>(self, verbose_name<font color="#909090">=None</font>, name<font color="#909090">=None</font>, default<font color="#909090">=None</font>, required<font color="#909090">=False</font>, validator<font color="#909090">=None</font>, choices<font color="#909090">=None</font>, indexed<font color="#909090">=True</font>)</dt><dd><tt>Initializes&nbsp;this&nbsp;<a href="google.appengine.ext.db.html#Property">Property</a>&nbsp;with&nbsp;the&nbsp;given&nbsp;options.<br>
&nbsp;<br>
Args:<br>
&nbsp;&nbsp;verbose_name:&nbsp;User&nbsp;friendly&nbsp;name&nbsp;of&nbsp;property.<br>
&nbsp;&nbsp;name:&nbsp;<a href="oauth2client.client.html#Storage">Storage</a>&nbsp;name&nbsp;for&nbsp;property.&nbsp;&nbsp;By&nbsp;default,&nbsp;uses&nbsp;attribute&nbsp;name<br>
&nbsp;&nbsp;&nbsp;&nbsp;as&nbsp;it&nbsp;is&nbsp;assigned&nbsp;in&nbsp;the&nbsp;<a href="google.appengine.ext.db.html#Model">Model</a>&nbsp;sub-class.<br>
&nbsp;&nbsp;default:&nbsp;Default&nbsp;value&nbsp;for&nbsp;property&nbsp;if&nbsp;none&nbsp;is&nbsp;assigned.<br>
&nbsp;&nbsp;required:&nbsp;Whether&nbsp;property&nbsp;is&nbsp;required.<br>
&nbsp;&nbsp;validator:&nbsp;User&nbsp;provided&nbsp;method&nbsp;used&nbsp;for&nbsp;validation.<br>
&nbsp;&nbsp;choices:&nbsp;User&nbsp;provided&nbsp;set&nbsp;of&nbsp;valid&nbsp;property&nbsp;values.<br>
&nbsp;&nbsp;indexed:&nbsp;Whether&nbsp;property&nbsp;is&nbsp;indexed.</tt></dd></dl>

<dl><dt><a name="CredentialsProperty-__property_config__"><strong>__property_config__</strong></a>(self, model_class, property_name)</dt><dd><tt>Configure&nbsp;property,&nbsp;connecting&nbsp;it&nbsp;to&nbsp;its&nbsp;model.<br>
&nbsp;<br>
Configure&nbsp;the&nbsp;property&nbsp;so&nbsp;that&nbsp;it&nbsp;knows&nbsp;its&nbsp;property&nbsp;name&nbsp;and&nbsp;what&nbsp;class<br>
it&nbsp;belongs&nbsp;to.<br>
&nbsp;<br>
Args:<br>
&nbsp;&nbsp;model_class:&nbsp;<a href="google.appengine.ext.db.html#Model">Model</a>&nbsp;class&nbsp;which&nbsp;<a href="google.appengine.ext.db.html#Property">Property</a>&nbsp;will&nbsp;belong&nbsp;to.<br>
&nbsp;&nbsp;property_name:&nbsp;Name&nbsp;of&nbsp;property&nbsp;within&nbsp;<a href="google.appengine.ext.db.html#Model">Model</a>&nbsp;instance&nbsp;to&nbsp;store&nbsp;property<br>
&nbsp;&nbsp;&nbsp;&nbsp;values&nbsp;in.&nbsp;&nbsp;By&nbsp;default&nbsp;this&nbsp;will&nbsp;be&nbsp;the&nbsp;property&nbsp;name&nbsp;preceded&nbsp;by<br>
&nbsp;&nbsp;&nbsp;&nbsp;an&nbsp;underscore,&nbsp;but&nbsp;may&nbsp;change&nbsp;for&nbsp;different&nbsp;subclasses.</tt></dd></dl>

<dl><dt><a name="CredentialsProperty-__set__"><strong>__set__</strong></a>(self, model_instance, value)</dt><dd><tt>Sets&nbsp;the&nbsp;value&nbsp;for&nbsp;this&nbsp;property&nbsp;on&nbsp;the&nbsp;given&nbsp;model&nbsp;instance.<br>
&nbsp;<br>
See&nbsp;<a href="http://docs.python.org/ref/descriptors.html">http://docs.python.org/ref/descriptors.html</a>&nbsp;for&nbsp;a&nbsp;description&nbsp;of<br>
the&nbsp;arguments&nbsp;to&nbsp;this&nbsp;class&nbsp;and&nbsp;what&nbsp;they&nbsp;mean.</tt></dd></dl>

<dl><dt><a name="CredentialsProperty-datastore_type"><strong>datastore_type</strong></a>(self)</dt><dd><tt>Deprecated&nbsp;backwards-compatible&nbsp;accessor&nbsp;method&nbsp;for&nbsp;self.<strong>data_type</strong>.</tt></dd></dl>

<dl><dt><a name="CredentialsProperty-default_value"><strong>default_value</strong></a>(self)</dt><dd><tt>Default&nbsp;value&nbsp;for&nbsp;unassigned&nbsp;values.<br>
&nbsp;<br>
Returns:<br>
&nbsp;&nbsp;Default&nbsp;value&nbsp;as&nbsp;provided&nbsp;by&nbsp;<a href="#CredentialsProperty-__init__">__init__</a>(default).</tt></dd></dl>

<dl><dt><a name="CredentialsProperty-empty"><strong>empty</strong></a>(self, value)</dt><dd><tt>Determine&nbsp;if&nbsp;value&nbsp;is&nbsp;empty&nbsp;in&nbsp;the&nbsp;context&nbsp;of&nbsp;this&nbsp;property.<br>
&nbsp;<br>
For&nbsp;most&nbsp;kinds,&nbsp;this&nbsp;is&nbsp;equivalent&nbsp;to&nbsp;"not&nbsp;value",&nbsp;but&nbsp;for&nbsp;kinds&nbsp;like<br>
bool,&nbsp;the&nbsp;test&nbsp;is&nbsp;more&nbsp;subtle,&nbsp;so&nbsp;subclasses&nbsp;can&nbsp;override&nbsp;this&nbsp;method<br>
if&nbsp;necessary.<br>
&nbsp;<br>
Args:<br>
&nbsp;&nbsp;value:&nbsp;Value&nbsp;to&nbsp;validate&nbsp;against&nbsp;this&nbsp;<a href="google.appengine.ext.db.html#Property">Property</a>.<br>
&nbsp;<br>
Returns:<br>
&nbsp;&nbsp;True&nbsp;if&nbsp;this&nbsp;value&nbsp;is&nbsp;considered&nbsp;empty&nbsp;in&nbsp;the&nbsp;context&nbsp;of&nbsp;this&nbsp;<a href="google.appengine.ext.db.html#Property">Property</a><br>
&nbsp;&nbsp;type,&nbsp;otherwise&nbsp;False.</tt></dd></dl>

<dl><dt><a name="CredentialsProperty-get_updated_value_for_datastore"><strong>get_updated_value_for_datastore</strong></a>(self, model_instance)</dt><dd><tt>Determine&nbsp;new&nbsp;value&nbsp;for&nbsp;auto-updated&nbsp;property.<br>
&nbsp;<br>
Some&nbsp;properies&nbsp;(e.g.&nbsp;DateTimeProperty,&nbsp;UserProperty)&nbsp;optionally&nbsp;update&nbsp;their<br>
value&nbsp;on&nbsp;every&nbsp;put().&nbsp;This&nbsp;call&nbsp;must&nbsp;return&nbsp;the&nbsp;new&nbsp;desired&nbsp;value&nbsp;for&nbsp;such<br>
properties.&nbsp;For&nbsp;all&nbsp;other&nbsp;properties,&nbsp;this&nbsp;call&nbsp;must&nbsp;return<br>
AUTO_UPDATE_UNCHANGED.<br>
&nbsp;<br>
Args:<br>
&nbsp;&nbsp;model_instance:&nbsp;Instance&nbsp;to&nbsp;get&nbsp;new&nbsp;value&nbsp;for.<br>
&nbsp;<br>
Returns:<br>
&nbsp;&nbsp;Datastore&nbsp;representation&nbsp;of&nbsp;the&nbsp;new&nbsp;model&nbsp;value&nbsp;in&nbsp;a&nbsp;form&nbsp;that&nbsp;is<br>
&nbsp;&nbsp;appropriate&nbsp;for&nbsp;storing&nbsp;in&nbsp;the&nbsp;datastore,&nbsp;or&nbsp;AUTO_UPDATE_UNCHANGED.</tt></dd></dl>

<hr>
Data descriptors inherited from <a href="google.appengine.ext.db.html#Property">google.appengine.ext.db.Property</a>:<br>
<dl><dt><strong>__dict__</strong></dt>
<dd><tt>dictionary&nbsp;for&nbsp;instance&nbsp;variables&nbsp;(if&nbsp;defined)</tt></dd>
</dl>
<dl><dt><strong>__weakref__</strong></dt>
<dd><tt>list&nbsp;of&nbsp;weak&nbsp;references&nbsp;to&nbsp;the&nbsp;object&nbsp;(if&nbsp;defined)</tt></dd>
</dl>
<hr>
Data and other attributes inherited from <a href="google.appengine.ext.db.html#Property">google.appengine.ext.db.Property</a>:<br>
<dl><dt><strong>creation_counter</strong> = 1</dl>

</td></tr></table> <p>
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
<tr bgcolor="#ffc8d8">
<td colspan=3 valign=bottom>&nbsp;<br>
<font color="#000000" face="helvetica, arial"><a name="FlowProperty">class <strong>FlowProperty</strong></a>(<a href="google.appengine.ext.db.html#Property">google.appengine.ext.db.Property</a>)</font></td></tr>
    
<tr bgcolor="#ffc8d8"><td rowspan=2><tt>&nbsp;&nbsp;&nbsp;</tt></td>
<td colspan=2><tt>App&nbsp;Engine&nbsp;datastore&nbsp;<a href="google.appengine.ext.db.html#Property">Property</a>&nbsp;for&nbsp;Flow.<br>
&nbsp;<br>
Utility&nbsp;property&nbsp;that&nbsp;allows&nbsp;easy&nbsp;storage&nbsp;and&nbsp;retreival&nbsp;of&nbsp;an<br>
oauth2client.Flow<br>&nbsp;</tt></td></tr>
<tr><td>&nbsp;</td>
<td width="100%"><dl><dt>Method resolution order:</dt>
<dd><a href="oauth2client.appengine.html#FlowProperty">FlowProperty</a></dd>
<dd><a href="google.appengine.ext.db.html#Property">google.appengine.ext.db.Property</a></dd>
<dd><a href="__builtin__.html#object">__builtin__.object</a></dd>
</dl>
<hr>
Methods defined here:<br>
<dl><dt><a name="FlowProperty-empty"><strong>empty</strong></a>(self, value)</dt></dl>

<dl><dt><a name="FlowProperty-get_value_for_datastore"><strong>get_value_for_datastore</strong></a>(self, model_instance)</dt><dd><tt>#&nbsp;For&nbsp;writing&nbsp;to&nbsp;datastore.</tt></dd></dl>

<dl><dt><a name="FlowProperty-make_value_from_datastore"><strong>make_value_from_datastore</strong></a>(self, value)</dt><dd><tt>#&nbsp;For&nbsp;reading&nbsp;from&nbsp;datastore.</tt></dd></dl>

<dl><dt><a name="FlowProperty-validate"><strong>validate</strong></a>(self, value)</dt></dl>

<hr>
Data and other attributes defined here:<br>
<dl><dt><strong>data_type</strong> = &lt;class 'oauth2client.client.Flow'&gt;<dd><tt>Base&nbsp;class&nbsp;for&nbsp;all&nbsp;Flow&nbsp;objects.</tt></dl>

<hr>
Methods inherited from <a href="google.appengine.ext.db.html#Property">google.appengine.ext.db.Property</a>:<br>
<dl><dt><a name="FlowProperty-__get__"><strong>__get__</strong></a>(self, model_instance, model_class)</dt><dd><tt>Returns&nbsp;the&nbsp;value&nbsp;for&nbsp;this&nbsp;property&nbsp;on&nbsp;the&nbsp;given&nbsp;model&nbsp;instance.<br>
&nbsp;<br>
See&nbsp;<a href="http://docs.python.org/ref/descriptors.html">http://docs.python.org/ref/descriptors.html</a>&nbsp;for&nbsp;a&nbsp;description&nbsp;of<br>
the&nbsp;arguments&nbsp;to&nbsp;this&nbsp;class&nbsp;and&nbsp;what&nbsp;they&nbsp;mean.</tt></dd></dl>

<dl><dt><a name="FlowProperty-__init__"><strong>__init__</strong></a>(self, verbose_name<font color="#909090">=None</font>, name<font color="#909090">=None</font>, default<font color="#909090">=None</font>, required<font color="#909090">=False</font>, validator<font color="#909090">=None</font>, choices<font color="#909090">=None</font>, indexed<font color="#909090">=True</font>)</dt><dd><tt>Initializes&nbsp;this&nbsp;<a href="google.appengine.ext.db.html#Property">Property</a>&nbsp;with&nbsp;the&nbsp;given&nbsp;options.<br>
&nbsp;<br>
Args:<br>
&nbsp;&nbsp;verbose_name:&nbsp;User&nbsp;friendly&nbsp;name&nbsp;of&nbsp;property.<br>
&nbsp;&nbsp;name:&nbsp;<a href="oauth2client.client.html#Storage">Storage</a>&nbsp;name&nbsp;for&nbsp;property.&nbsp;&nbsp;By&nbsp;default,&nbsp;uses&nbsp;attribute&nbsp;name<br>
&nbsp;&nbsp;&nbsp;&nbsp;as&nbsp;it&nbsp;is&nbsp;assigned&nbsp;in&nbsp;the&nbsp;<a href="google.appengine.ext.db.html#Model">Model</a>&nbsp;sub-class.<br>
&nbsp;&nbsp;default:&nbsp;Default&nbsp;value&nbsp;for&nbsp;property&nbsp;if&nbsp;none&nbsp;is&nbsp;assigned.<br>
&nbsp;&nbsp;required:&nbsp;Whether&nbsp;property&nbsp;is&nbsp;required.<br>
&nbsp;&nbsp;validator:&nbsp;User&nbsp;provided&nbsp;method&nbsp;used&nbsp;for&nbsp;validation.<br>
&nbsp;&nbsp;choices:&nbsp;User&nbsp;provided&nbsp;set&nbsp;of&nbsp;valid&nbsp;property&nbsp;values.<br>
&nbsp;&nbsp;indexed:&nbsp;Whether&nbsp;property&nbsp;is&nbsp;indexed.</tt></dd></dl>

<dl><dt><a name="FlowProperty-__property_config__"><strong>__property_config__</strong></a>(self, model_class, property_name)</dt><dd><tt>Configure&nbsp;property,&nbsp;connecting&nbsp;it&nbsp;to&nbsp;its&nbsp;model.<br>
&nbsp;<br>
Configure&nbsp;the&nbsp;property&nbsp;so&nbsp;that&nbsp;it&nbsp;knows&nbsp;its&nbsp;property&nbsp;name&nbsp;and&nbsp;what&nbsp;class<br>
it&nbsp;belongs&nbsp;to.<br>
&nbsp;<br>
Args:<br>
&nbsp;&nbsp;model_class:&nbsp;<a href="google.appengine.ext.db.html#Model">Model</a>&nbsp;class&nbsp;which&nbsp;<a href="google.appengine.ext.db.html#Property">Property</a>&nbsp;will&nbsp;belong&nbsp;to.<br>
&nbsp;&nbsp;property_name:&nbsp;Name&nbsp;of&nbsp;property&nbsp;within&nbsp;<a href="google.appengine.ext.db.html#Model">Model</a>&nbsp;instance&nbsp;to&nbsp;store&nbsp;property<br>
&nbsp;&nbsp;&nbsp;&nbsp;values&nbsp;in.&nbsp;&nbsp;By&nbsp;default&nbsp;this&nbsp;will&nbsp;be&nbsp;the&nbsp;property&nbsp;name&nbsp;preceded&nbsp;by<br>
&nbsp;&nbsp;&nbsp;&nbsp;an&nbsp;underscore,&nbsp;but&nbsp;may&nbsp;change&nbsp;for&nbsp;different&nbsp;subclasses.</tt></dd></dl>

<dl><dt><a name="FlowProperty-__set__"><strong>__set__</strong></a>(self, model_instance, value)</dt><dd><tt>Sets&nbsp;the&nbsp;value&nbsp;for&nbsp;this&nbsp;property&nbsp;on&nbsp;the&nbsp;given&nbsp;model&nbsp;instance.<br>
&nbsp;<br>
See&nbsp;<a href="http://docs.python.org/ref/descriptors.html">http://docs.python.org/ref/descriptors.html</a>&nbsp;for&nbsp;a&nbsp;description&nbsp;of<br>
the&nbsp;arguments&nbsp;to&nbsp;this&nbsp;class&nbsp;and&nbsp;what&nbsp;they&nbsp;mean.</tt></dd></dl>

<dl><dt><a name="FlowProperty-datastore_type"><strong>datastore_type</strong></a>(self)</dt><dd><tt>Deprecated&nbsp;backwards-compatible&nbsp;accessor&nbsp;method&nbsp;for&nbsp;self.<strong>data_type</strong>.</tt></dd></dl>

<dl><dt><a name="FlowProperty-default_value"><strong>default_value</strong></a>(self)</dt><dd><tt>Default&nbsp;value&nbsp;for&nbsp;unassigned&nbsp;values.<br>
&nbsp;<br>
Returns:<br>
&nbsp;&nbsp;Default&nbsp;value&nbsp;as&nbsp;provided&nbsp;by&nbsp;<a href="#FlowProperty-__init__">__init__</a>(default).</tt></dd></dl>

<dl><dt><a name="FlowProperty-get_updated_value_for_datastore"><strong>get_updated_value_for_datastore</strong></a>(self, model_instance)</dt><dd><tt>Determine&nbsp;new&nbsp;value&nbsp;for&nbsp;auto-updated&nbsp;property.<br>
&nbsp;<br>
Some&nbsp;properies&nbsp;(e.g.&nbsp;DateTimeProperty,&nbsp;UserProperty)&nbsp;optionally&nbsp;update&nbsp;their<br>
value&nbsp;on&nbsp;every&nbsp;put().&nbsp;This&nbsp;call&nbsp;must&nbsp;return&nbsp;the&nbsp;new&nbsp;desired&nbsp;value&nbsp;for&nbsp;such<br>
properties.&nbsp;For&nbsp;all&nbsp;other&nbsp;properties,&nbsp;this&nbsp;call&nbsp;must&nbsp;return<br>
AUTO_UPDATE_UNCHANGED.<br>
&nbsp;<br>
Args:<br>
&nbsp;&nbsp;model_instance:&nbsp;Instance&nbsp;to&nbsp;get&nbsp;new&nbsp;value&nbsp;for.<br>
&nbsp;<br>
Returns:<br>
&nbsp;&nbsp;Datastore&nbsp;representation&nbsp;of&nbsp;the&nbsp;new&nbsp;model&nbsp;value&nbsp;in&nbsp;a&nbsp;form&nbsp;that&nbsp;is<br>
&nbsp;&nbsp;appropriate&nbsp;for&nbsp;storing&nbsp;in&nbsp;the&nbsp;datastore,&nbsp;or&nbsp;AUTO_UPDATE_UNCHANGED.</tt></dd></dl>

<hr>
Data descriptors inherited from <a href="google.appengine.ext.db.html#Property">google.appengine.ext.db.Property</a>:<br>
<dl><dt><strong>__dict__</strong></dt>
<dd><tt>dictionary&nbsp;for&nbsp;instance&nbsp;variables&nbsp;(if&nbsp;defined)</tt></dd>
</dl>
<dl><dt><strong>__weakref__</strong></dt>
<dd><tt>list&nbsp;of&nbsp;weak&nbsp;references&nbsp;to&nbsp;the&nbsp;object&nbsp;(if&nbsp;defined)</tt></dd>
</dl>
<hr>
Data and other attributes inherited from <a href="google.appengine.ext.db.html#Property">google.appengine.ext.db.Property</a>:<br>
<dl><dt><strong>creation_counter</strong> = 1</dl>

</td></tr></table> <p>
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
<tr bgcolor="#ffc8d8">
<td colspan=3 valign=bottom>&nbsp;<br>
<font color="#000000" face="helvetica, arial"><a name="InvalidClientSecretsError">class <strong>InvalidClientSecretsError</strong></a>(<a href="exceptions.html#Exception">exceptions.Exception</a>)</font></td></tr>
    
<tr bgcolor="#ffc8d8"><td rowspan=2><tt>&nbsp;&nbsp;&nbsp;</tt></td>
<td colspan=2><tt>The&nbsp;client_secrets.json&nbsp;file&nbsp;is&nbsp;malformed&nbsp;or&nbsp;missing&nbsp;required&nbsp;fields.<br>&nbsp;</tt></td></tr>
<tr><td>&nbsp;</td>
<td width="100%"><dl><dt>Method resolution order:</dt>
<dd><a href="oauth2client.appengine.html#InvalidClientSecretsError">InvalidClientSecretsError</a></dd>
<dd><a href="exceptions.html#Exception">exceptions.Exception</a></dd>
<dd><a href="exceptions.html#BaseException">exceptions.BaseException</a></dd>
<dd><a href="__builtin__.html#object">__builtin__.object</a></dd>
</dl>
<hr>
Data descriptors defined here:<br>
<dl><dt><strong>__weakref__</strong></dt>
<dd><tt>list&nbsp;of&nbsp;weak&nbsp;references&nbsp;to&nbsp;the&nbsp;object&nbsp;(if&nbsp;defined)</tt></dd>
</dl>
<hr>
Methods inherited from <a href="exceptions.html#Exception">exceptions.Exception</a>:<br>
<dl><dt><a name="InvalidClientSecretsError-__init__"><strong>__init__</strong></a>(...)</dt><dd><tt>x.<a href="#InvalidClientSecretsError-__init__">__init__</a>(...)&nbsp;initializes&nbsp;x;&nbsp;see&nbsp;x.__class__.__doc__&nbsp;for&nbsp;signature</tt></dd></dl>

<hr>
Data and other attributes inherited from <a href="exceptions.html#Exception">exceptions.Exception</a>:<br>
<dl><dt><strong>__new__</strong> = &lt;built-in method __new__ of type object&gt;<dd><tt>T.<a href="#InvalidClientSecretsError-__new__">__new__</a>(S,&nbsp;...)&nbsp;-&gt;&nbsp;a&nbsp;new&nbsp;<a href="__builtin__.html#object">object</a>&nbsp;with&nbsp;type&nbsp;S,&nbsp;a&nbsp;subtype&nbsp;of&nbsp;T</tt></dl>

<hr>
Methods inherited from <a href="exceptions.html#BaseException">exceptions.BaseException</a>:<br>
<dl><dt><a name="InvalidClientSecretsError-__delattr__"><strong>__delattr__</strong></a>(...)</dt><dd><tt>x.<a href="#InvalidClientSecretsError-__delattr__">__delattr__</a>('name')&nbsp;&lt;==&gt;&nbsp;del&nbsp;x.name</tt></dd></dl>

<dl><dt><a name="InvalidClientSecretsError-__getattribute__"><strong>__getattribute__</strong></a>(...)</dt><dd><tt>x.<a href="#InvalidClientSecretsError-__getattribute__">__getattribute__</a>('name')&nbsp;&lt;==&gt;&nbsp;x.name</tt></dd></dl>

<dl><dt><a name="InvalidClientSecretsError-__getitem__"><strong>__getitem__</strong></a>(...)</dt><dd><tt>x.<a href="#InvalidClientSecretsError-__getitem__">__getitem__</a>(y)&nbsp;&lt;==&gt;&nbsp;x[y]</tt></dd></dl>

<dl><dt><a name="InvalidClientSecretsError-__getslice__"><strong>__getslice__</strong></a>(...)</dt><dd><tt>x.<a href="#InvalidClientSecretsError-__getslice__">__getslice__</a>(i,&nbsp;j)&nbsp;&lt;==&gt;&nbsp;x[i:j]<br>
&nbsp;<br>
Use&nbsp;of&nbsp;negative&nbsp;indices&nbsp;is&nbsp;not&nbsp;supported.</tt></dd></dl>

<dl><dt><a name="InvalidClientSecretsError-__reduce__"><strong>__reduce__</strong></a>(...)</dt></dl>

<dl><dt><a name="InvalidClientSecretsError-__repr__"><strong>__repr__</strong></a>(...)</dt><dd><tt>x.<a href="#InvalidClientSecretsError-__repr__">__repr__</a>()&nbsp;&lt;==&gt;&nbsp;repr(x)</tt></dd></dl>

<dl><dt><a name="InvalidClientSecretsError-__setattr__"><strong>__setattr__</strong></a>(...)</dt><dd><tt>x.<a href="#InvalidClientSecretsError-__setattr__">__setattr__</a>('name',&nbsp;value)&nbsp;&lt;==&gt;&nbsp;x.name&nbsp;=&nbsp;value</tt></dd></dl>

<dl><dt><a name="InvalidClientSecretsError-__setstate__"><strong>__setstate__</strong></a>(...)</dt></dl>

<dl><dt><a name="InvalidClientSecretsError-__str__"><strong>__str__</strong></a>(...)</dt><dd><tt>x.<a href="#InvalidClientSecretsError-__str__">__str__</a>()&nbsp;&lt;==&gt;&nbsp;str(x)</tt></dd></dl>

<dl><dt><a name="InvalidClientSecretsError-__unicode__"><strong>__unicode__</strong></a>(...)</dt></dl>

<hr>
Data descriptors inherited from <a href="exceptions.html#BaseException">exceptions.BaseException</a>:<br>
<dl><dt><strong>__dict__</strong></dt>
</dl>
<dl><dt><strong>args</strong></dt>
</dl>
<dl><dt><strong>message</strong></dt>
</dl>
</td></tr></table> <p>
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
<tr bgcolor="#ffc8d8">
<td colspan=3 valign=bottom>&nbsp;<br>
<font color="#000000" face="helvetica, arial"><a name="OAuth2Decorator">class <strong>OAuth2Decorator</strong></a>(<a href="__builtin__.html#object">__builtin__.object</a>)</font></td></tr>
    
<tr bgcolor="#ffc8d8"><td rowspan=2><tt>&nbsp;&nbsp;&nbsp;</tt></td>
<td colspan=2><tt>Utility&nbsp;for&nbsp;making&nbsp;OAuth&nbsp;2.0&nbsp;easier.<br>
&nbsp;<br>
Instantiate&nbsp;and&nbsp;then&nbsp;use&nbsp;with&nbsp;oauth_required&nbsp;or&nbsp;oauth_aware<br>
as&nbsp;decorators&nbsp;on&nbsp;webapp.<a href="google.appengine.ext.webapp._webapp25.html#RequestHandler">RequestHandler</a>&nbsp;methods.<br>
&nbsp;<br>
Example:<br>
&nbsp;<br>
&nbsp;&nbsp;decorator&nbsp;=&nbsp;<a href="#OAuth2Decorator">OAuth2Decorator</a>(<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;client_id='837...ent.com',<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;client_secret='Qh...wwI',<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;scope='https://www.googleapis.com/auth/plus')<br>
&nbsp;<br>
&nbsp;<br>
&nbsp;&nbsp;class&nbsp;MainHandler(webapp.<a href="google.appengine.ext.webapp._webapp25.html#RequestHandler">RequestHandler</a>):<br>
&nbsp;<br>
&nbsp;&nbsp;&nbsp;&nbsp;@decorator.oauth_required<br>
&nbsp;&nbsp;&nbsp;&nbsp;def&nbsp;get(self):<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;http&nbsp;=&nbsp;decorator.<a href="#OAuth2Decorator-http">http</a>()<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;#&nbsp;http&nbsp;is&nbsp;authorized&nbsp;with&nbsp;the&nbsp;user's&nbsp;Credentials&nbsp;and&nbsp;can&nbsp;be&nbsp;used<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;#&nbsp;in&nbsp;API&nbsp;calls<br>&nbsp;</tt></td></tr>
<tr><td>&nbsp;</td>
<td width="100%">Methods defined here:<br>
<dl><dt><a name="OAuth2Decorator-__init__"><strong>__init__</strong></a>(self, client_id, client_secret, scope, auth_uri<font color="#909090">='https://accounts.google.com/o/oauth2/auth'</font>, token_uri<font color="#909090">='https://accounts.google.com/o/oauth2/token'</font>, user_agent<font color="#909090">=None</font>, message<font color="#909090">=None</font>, **kwargs)</dt><dd><tt>Constructor&nbsp;for&nbsp;<a href="#OAuth2Decorator">OAuth2Decorator</a><br>
&nbsp;<br>
Args:<br>
&nbsp;&nbsp;client_id:&nbsp;string,&nbsp;client&nbsp;identifier.<br>
&nbsp;&nbsp;client_secret:&nbsp;string&nbsp;client&nbsp;secret.<br>
&nbsp;&nbsp;scope:&nbsp;string&nbsp;or&nbsp;list&nbsp;of&nbsp;strings,&nbsp;scope(s)&nbsp;of&nbsp;the&nbsp;credentials&nbsp;being<br>
&nbsp;&nbsp;&nbsp;&nbsp;requested.<br>
&nbsp;&nbsp;auth_uri:&nbsp;string,&nbsp;URI&nbsp;for&nbsp;authorization&nbsp;endpoint.&nbsp;For&nbsp;convenience<br>
&nbsp;&nbsp;&nbsp;&nbsp;defaults&nbsp;to&nbsp;Google's&nbsp;endpoints&nbsp;but&nbsp;any&nbsp;OAuth&nbsp;2.0&nbsp;provider&nbsp;can&nbsp;be&nbsp;used.<br>
&nbsp;&nbsp;token_uri:&nbsp;string,&nbsp;URI&nbsp;for&nbsp;token&nbsp;endpoint.&nbsp;For&nbsp;convenience<br>
&nbsp;&nbsp;&nbsp;&nbsp;defaults&nbsp;to&nbsp;Google's&nbsp;endpoints&nbsp;but&nbsp;any&nbsp;OAuth&nbsp;2.0&nbsp;provider&nbsp;can&nbsp;be&nbsp;used.<br>
&nbsp;&nbsp;user_agent:&nbsp;string,&nbsp;User&nbsp;agent&nbsp;of&nbsp;your&nbsp;application,&nbsp;default&nbsp;to&nbsp;None.<br>
&nbsp;&nbsp;message:&nbsp;Message&nbsp;to&nbsp;display&nbsp;if&nbsp;there&nbsp;are&nbsp;problems&nbsp;with&nbsp;the&nbsp;OAuth&nbsp;2.0<br>
&nbsp;&nbsp;&nbsp;&nbsp;configuration.&nbsp;The&nbsp;message&nbsp;may&nbsp;contain&nbsp;HTML&nbsp;and&nbsp;will&nbsp;be&nbsp;presented&nbsp;on&nbsp;the<br>
&nbsp;&nbsp;&nbsp;&nbsp;web&nbsp;interface&nbsp;for&nbsp;any&nbsp;method&nbsp;that&nbsp;uses&nbsp;the&nbsp;decorator.<br>
&nbsp;&nbsp;**kwargs:&nbsp;dict,&nbsp;Keyword&nbsp;arguments&nbsp;are&nbsp;be&nbsp;passed&nbsp;along&nbsp;as&nbsp;kwargs&nbsp;to&nbsp;the<br>
&nbsp;&nbsp;&nbsp;&nbsp;OAuth2WebServerFlow&nbsp;constructor.</tt></dd></dl>

<dl><dt><a name="OAuth2Decorator-authorize_url"><strong>authorize_url</strong></a>(self)</dt><dd><tt>Returns&nbsp;the&nbsp;URL&nbsp;to&nbsp;start&nbsp;the&nbsp;OAuth&nbsp;dance.<br>
&nbsp;<br>
Must&nbsp;only&nbsp;be&nbsp;called&nbsp;from&nbsp;with&nbsp;a&nbsp;webapp.<a href="google.appengine.ext.webapp._webapp25.html#RequestHandler">RequestHandler</a>&nbsp;subclassed&nbsp;method<br>
that&nbsp;had&nbsp;been&nbsp;decorated&nbsp;with&nbsp;either&nbsp;@oauth_required&nbsp;or&nbsp;@oauth_aware.</tt></dd></dl>

<dl><dt><a name="OAuth2Decorator-has_credentials"><strong>has_credentials</strong></a>(self)</dt><dd><tt>True&nbsp;if&nbsp;for&nbsp;the&nbsp;logged&nbsp;in&nbsp;user&nbsp;there&nbsp;are&nbsp;valid&nbsp;access&nbsp;Credentials.<br>
&nbsp;<br>
Must&nbsp;only&nbsp;be&nbsp;called&nbsp;from&nbsp;with&nbsp;a&nbsp;webapp.<a href="google.appengine.ext.webapp._webapp25.html#RequestHandler">RequestHandler</a>&nbsp;subclassed&nbsp;method<br>
that&nbsp;had&nbsp;been&nbsp;decorated&nbsp;with&nbsp;either&nbsp;@oauth_required&nbsp;or&nbsp;@oauth_aware.</tt></dd></dl>

<dl><dt><a name="OAuth2Decorator-http"><strong>http</strong></a>(self)</dt><dd><tt>Returns&nbsp;an&nbsp;authorized&nbsp;http&nbsp;instance.<br>
&nbsp;<br>
Must&nbsp;only&nbsp;be&nbsp;called&nbsp;from&nbsp;within&nbsp;an&nbsp;@oauth_required&nbsp;decorated&nbsp;method,&nbsp;or<br>
from&nbsp;within&nbsp;an&nbsp;@oauth_aware&nbsp;decorated&nbsp;method&nbsp;where&nbsp;<a href="#OAuth2Decorator-has_credentials">has_credentials</a>()<br>
returns&nbsp;True.</tt></dd></dl>

<dl><dt><a name="OAuth2Decorator-oauth_aware"><strong>oauth_aware</strong></a>(self, method)</dt><dd><tt>Decorator&nbsp;that&nbsp;sets&nbsp;up&nbsp;for&nbsp;OAuth&nbsp;2.0&nbsp;dance,&nbsp;but&nbsp;doesn't&nbsp;do&nbsp;it.<br>
&nbsp;<br>
Does&nbsp;all&nbsp;the&nbsp;setup&nbsp;for&nbsp;the&nbsp;OAuth&nbsp;dance,&nbsp;but&nbsp;doesn't&nbsp;initiate&nbsp;it.<br>
This&nbsp;decorator&nbsp;is&nbsp;useful&nbsp;if&nbsp;you&nbsp;want&nbsp;to&nbsp;create&nbsp;a&nbsp;page&nbsp;that&nbsp;knows<br>
whether&nbsp;or&nbsp;not&nbsp;the&nbsp;user&nbsp;has&nbsp;granted&nbsp;access&nbsp;to&nbsp;this&nbsp;application.<br>
From&nbsp;within&nbsp;a&nbsp;method&nbsp;decorated&nbsp;with&nbsp;@oauth_aware&nbsp;the&nbsp;<a href="#OAuth2Decorator-has_credentials">has_credentials</a>()<br>
and&nbsp;<a href="#OAuth2Decorator-authorize_url">authorize_url</a>()&nbsp;methods&nbsp;can&nbsp;be&nbsp;called.<br>
&nbsp;<br>
Args:<br>
&nbsp;&nbsp;method:&nbsp;callable,&nbsp;to&nbsp;be&nbsp;decorated&nbsp;method&nbsp;of&nbsp;a&nbsp;webapp.<a href="google.appengine.ext.webapp._webapp25.html#RequestHandler">RequestHandler</a><br>
&nbsp;&nbsp;&nbsp;&nbsp;instance.</tt></dd></dl>

<dl><dt><a name="OAuth2Decorator-oauth_required"><strong>oauth_required</strong></a>(self, method)</dt><dd><tt>Decorator&nbsp;that&nbsp;starts&nbsp;the&nbsp;OAuth&nbsp;2.0&nbsp;dance.<br>
&nbsp;<br>
Starts&nbsp;the&nbsp;OAuth&nbsp;dance&nbsp;for&nbsp;the&nbsp;logged&nbsp;in&nbsp;user&nbsp;if&nbsp;they&nbsp;haven't&nbsp;already<br>
granted&nbsp;access&nbsp;for&nbsp;this&nbsp;application.<br>
&nbsp;<br>
Args:<br>
&nbsp;&nbsp;method:&nbsp;callable,&nbsp;to&nbsp;be&nbsp;decorated&nbsp;method&nbsp;of&nbsp;a&nbsp;webapp.<a href="google.appengine.ext.webapp._webapp25.html#RequestHandler">RequestHandler</a><br>
&nbsp;&nbsp;&nbsp;&nbsp;instance.</tt></dd></dl>

<hr>
Data descriptors defined here:<br>
<dl><dt><strong>__dict__</strong></dt>
<dd><tt>dictionary&nbsp;for&nbsp;instance&nbsp;variables&nbsp;(if&nbsp;defined)</tt></dd>
</dl>
<dl><dt><strong>__weakref__</strong></dt>
<dd><tt>list&nbsp;of&nbsp;weak&nbsp;references&nbsp;to&nbsp;the&nbsp;object&nbsp;(if&nbsp;defined)</tt></dd>
</dl>
</td></tr></table> <p>
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
<tr bgcolor="#ffc8d8">
<td colspan=3 valign=bottom>&nbsp;<br>
<font color="#000000" face="helvetica, arial"><a name="OAuth2DecoratorFromClientSecrets">class <strong>OAuth2DecoratorFromClientSecrets</strong></a>(<a href="oauth2client.appengine.html#OAuth2Decorator">OAuth2Decorator</a>)</font></td></tr>
    
<tr bgcolor="#ffc8d8"><td rowspan=2><tt>&nbsp;&nbsp;&nbsp;</tt></td>
<td colspan=2><tt>An&nbsp;<a href="#OAuth2Decorator">OAuth2Decorator</a>&nbsp;that&nbsp;builds&nbsp;from&nbsp;a&nbsp;clientsecrets&nbsp;file.<br>
&nbsp;<br>
Uses&nbsp;a&nbsp;clientsecrets&nbsp;file&nbsp;as&nbsp;the&nbsp;source&nbsp;for&nbsp;all&nbsp;the&nbsp;information&nbsp;when<br>
constructing&nbsp;an&nbsp;<a href="#OAuth2Decorator">OAuth2Decorator</a>.<br>
&nbsp;<br>
Example:<br>
&nbsp;<br>
&nbsp;&nbsp;decorator&nbsp;=&nbsp;<a href="#OAuth2DecoratorFromClientSecrets">OAuth2DecoratorFromClientSecrets</a>(<br>
&nbsp;&nbsp;&nbsp;&nbsp;os.path.join(os.path.dirname(__file__),&nbsp;'client_secrets.json')<br>
&nbsp;&nbsp;&nbsp;&nbsp;scope='https://www.googleapis.com/auth/plus')<br>
&nbsp;<br>
&nbsp;<br>
&nbsp;&nbsp;class&nbsp;MainHandler(webapp.<a href="google.appengine.ext.webapp._webapp25.html#RequestHandler">RequestHandler</a>):<br>
&nbsp;<br>
&nbsp;&nbsp;&nbsp;&nbsp;@decorator.oauth_required<br>
&nbsp;&nbsp;&nbsp;&nbsp;def&nbsp;get(self):<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;http&nbsp;=&nbsp;decorator.<a href="#OAuth2DecoratorFromClientSecrets-http">http</a>()<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;#&nbsp;http&nbsp;is&nbsp;authorized&nbsp;with&nbsp;the&nbsp;user's&nbsp;Credentials&nbsp;and&nbsp;can&nbsp;be&nbsp;used<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;#&nbsp;in&nbsp;API&nbsp;calls<br>&nbsp;</tt></td></tr>
<tr><td>&nbsp;</td>
<td width="100%"><dl><dt>Method resolution order:</dt>
<dd><a href="oauth2client.appengine.html#OAuth2DecoratorFromClientSecrets">OAuth2DecoratorFromClientSecrets</a></dd>
<dd><a href="oauth2client.appengine.html#OAuth2Decorator">OAuth2Decorator</a></dd>
<dd><a href="__builtin__.html#object">__builtin__.object</a></dd>
</dl>
<hr>
Methods defined here:<br>
<dl><dt><a name="OAuth2DecoratorFromClientSecrets-__init__"><strong>__init__</strong></a>(self, filename, scope, message<font color="#909090">=None</font>)</dt><dd><tt>Constructor<br>
&nbsp;<br>
Args:<br>
&nbsp;&nbsp;filename:&nbsp;string,&nbsp;File&nbsp;name&nbsp;of&nbsp;client&nbsp;secrets.<br>
&nbsp;&nbsp;scope:&nbsp;string&nbsp;or&nbsp;list&nbsp;of&nbsp;strings,&nbsp;scope(s)&nbsp;of&nbsp;the&nbsp;credentials&nbsp;being<br>
&nbsp;&nbsp;&nbsp;&nbsp;requested.<br>
&nbsp;&nbsp;message:&nbsp;string,&nbsp;A&nbsp;friendly&nbsp;string&nbsp;to&nbsp;display&nbsp;to&nbsp;the&nbsp;user&nbsp;if&nbsp;the<br>
&nbsp;&nbsp;&nbsp;&nbsp;clientsecrets&nbsp;file&nbsp;is&nbsp;missing&nbsp;or&nbsp;invalid.&nbsp;The&nbsp;message&nbsp;may&nbsp;contain&nbsp;HTML&nbsp;and<br>
&nbsp;&nbsp;&nbsp;&nbsp;will&nbsp;be&nbsp;presented&nbsp;on&nbsp;the&nbsp;web&nbsp;interface&nbsp;for&nbsp;any&nbsp;method&nbsp;that&nbsp;uses&nbsp;the<br>
&nbsp;&nbsp;&nbsp;&nbsp;decorator.</tt></dd></dl>

<hr>
Methods inherited from <a href="oauth2client.appengine.html#OAuth2Decorator">OAuth2Decorator</a>:<br>
<dl><dt><a name="OAuth2DecoratorFromClientSecrets-authorize_url"><strong>authorize_url</strong></a>(self)</dt><dd><tt>Returns&nbsp;the&nbsp;URL&nbsp;to&nbsp;start&nbsp;the&nbsp;OAuth&nbsp;dance.<br>
&nbsp;<br>
Must&nbsp;only&nbsp;be&nbsp;called&nbsp;from&nbsp;with&nbsp;a&nbsp;webapp.<a href="google.appengine.ext.webapp._webapp25.html#RequestHandler">RequestHandler</a>&nbsp;subclassed&nbsp;method<br>
that&nbsp;had&nbsp;been&nbsp;decorated&nbsp;with&nbsp;either&nbsp;@oauth_required&nbsp;or&nbsp;@oauth_aware.</tt></dd></dl>

<dl><dt><a name="OAuth2DecoratorFromClientSecrets-has_credentials"><strong>has_credentials</strong></a>(self)</dt><dd><tt>True&nbsp;if&nbsp;for&nbsp;the&nbsp;logged&nbsp;in&nbsp;user&nbsp;there&nbsp;are&nbsp;valid&nbsp;access&nbsp;Credentials.<br>
&nbsp;<br>
Must&nbsp;only&nbsp;be&nbsp;called&nbsp;from&nbsp;with&nbsp;a&nbsp;webapp.<a href="google.appengine.ext.webapp._webapp25.html#RequestHandler">RequestHandler</a>&nbsp;subclassed&nbsp;method<br>
that&nbsp;had&nbsp;been&nbsp;decorated&nbsp;with&nbsp;either&nbsp;@oauth_required&nbsp;or&nbsp;@oauth_aware.</tt></dd></dl>

<dl><dt><a name="OAuth2DecoratorFromClientSecrets-http"><strong>http</strong></a>(self)</dt><dd><tt>Returns&nbsp;an&nbsp;authorized&nbsp;http&nbsp;instance.<br>
&nbsp;<br>
Must&nbsp;only&nbsp;be&nbsp;called&nbsp;from&nbsp;within&nbsp;an&nbsp;@oauth_required&nbsp;decorated&nbsp;method,&nbsp;or<br>
from&nbsp;within&nbsp;an&nbsp;@oauth_aware&nbsp;decorated&nbsp;method&nbsp;where&nbsp;<a href="#OAuth2DecoratorFromClientSecrets-has_credentials">has_credentials</a>()<br>
returns&nbsp;True.</tt></dd></dl>

<dl><dt><a name="OAuth2DecoratorFromClientSecrets-oauth_aware"><strong>oauth_aware</strong></a>(self, method)</dt><dd><tt>Decorator&nbsp;that&nbsp;sets&nbsp;up&nbsp;for&nbsp;OAuth&nbsp;2.0&nbsp;dance,&nbsp;but&nbsp;doesn't&nbsp;do&nbsp;it.<br>
&nbsp;<br>
Does&nbsp;all&nbsp;the&nbsp;setup&nbsp;for&nbsp;the&nbsp;OAuth&nbsp;dance,&nbsp;but&nbsp;doesn't&nbsp;initiate&nbsp;it.<br>
This&nbsp;decorator&nbsp;is&nbsp;useful&nbsp;if&nbsp;you&nbsp;want&nbsp;to&nbsp;create&nbsp;a&nbsp;page&nbsp;that&nbsp;knows<br>
whether&nbsp;or&nbsp;not&nbsp;the&nbsp;user&nbsp;has&nbsp;granted&nbsp;access&nbsp;to&nbsp;this&nbsp;application.<br>
From&nbsp;within&nbsp;a&nbsp;method&nbsp;decorated&nbsp;with&nbsp;@oauth_aware&nbsp;the&nbsp;<a href="#OAuth2DecoratorFromClientSecrets-has_credentials">has_credentials</a>()<br>
and&nbsp;<a href="#OAuth2DecoratorFromClientSecrets-authorize_url">authorize_url</a>()&nbsp;methods&nbsp;can&nbsp;be&nbsp;called.<br>
&nbsp;<br>
Args:<br>
&nbsp;&nbsp;method:&nbsp;callable,&nbsp;to&nbsp;be&nbsp;decorated&nbsp;method&nbsp;of&nbsp;a&nbsp;webapp.<a href="google.appengine.ext.webapp._webapp25.html#RequestHandler">RequestHandler</a><br>
&nbsp;&nbsp;&nbsp;&nbsp;instance.</tt></dd></dl>

<dl><dt><a name="OAuth2DecoratorFromClientSecrets-oauth_required"><strong>oauth_required</strong></a>(self, method)</dt><dd><tt>Decorator&nbsp;that&nbsp;starts&nbsp;the&nbsp;OAuth&nbsp;2.0&nbsp;dance.<br>
&nbsp;<br>
Starts&nbsp;the&nbsp;OAuth&nbsp;dance&nbsp;for&nbsp;the&nbsp;logged&nbsp;in&nbsp;user&nbsp;if&nbsp;they&nbsp;haven't&nbsp;already<br>
granted&nbsp;access&nbsp;for&nbsp;this&nbsp;application.<br>
&nbsp;<br>
Args:<br>
&nbsp;&nbsp;method:&nbsp;callable,&nbsp;to&nbsp;be&nbsp;decorated&nbsp;method&nbsp;of&nbsp;a&nbsp;webapp.<a href="google.appengine.ext.webapp._webapp25.html#RequestHandler">RequestHandler</a><br>
&nbsp;&nbsp;&nbsp;&nbsp;instance.</tt></dd></dl>

<hr>
Data descriptors inherited from <a href="oauth2client.appengine.html#OAuth2Decorator">OAuth2Decorator</a>:<br>
<dl><dt><strong>__dict__</strong></dt>
<dd><tt>dictionary&nbsp;for&nbsp;instance&nbsp;variables&nbsp;(if&nbsp;defined)</tt></dd>
</dl>
<dl><dt><strong>__weakref__</strong></dt>
<dd><tt>list&nbsp;of&nbsp;weak&nbsp;references&nbsp;to&nbsp;the&nbsp;object&nbsp;(if&nbsp;defined)</tt></dd>
</dl>
</td></tr></table> <p>
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
<tr bgcolor="#ffc8d8">
<td colspan=3 valign=bottom>&nbsp;<br>
<font color="#000000" face="helvetica, arial"><a name="OAuth2Handler">class <strong>OAuth2Handler</strong></a>(<a href="google.appengine.ext.webapp._webapp25.html#RequestHandler">google.appengine.ext.webapp._webapp25.RequestHandler</a>)</font></td></tr>
    
<tr bgcolor="#ffc8d8"><td rowspan=2><tt>&nbsp;&nbsp;&nbsp;</tt></td>
<td colspan=2><tt>Handler&nbsp;for&nbsp;the&nbsp;redirect_uri&nbsp;of&nbsp;the&nbsp;OAuth&nbsp;2.0&nbsp;dance.<br>&nbsp;</tt></td></tr>
<tr><td>&nbsp;</td>
<td width="100%"><dl><dt>Method resolution order:</dt>
<dd><a href="oauth2client.appengine.html#OAuth2Handler">OAuth2Handler</a></dd>
<dd><a href="google.appengine.ext.webapp._webapp25.html#RequestHandler">google.appengine.ext.webapp._webapp25.RequestHandler</a></dd>
<dd><a href="__builtin__.html#object">__builtin__.object</a></dd>
</dl>
<hr>
Methods defined here:<br>
<dl><dt><a name="OAuth2Handler-get"><strong>get</strong></a> = check_login(self, *args)</dt></dl>

<hr>
Methods inherited from <a href="google.appengine.ext.webapp._webapp25.html#RequestHandler">google.appengine.ext.webapp._webapp25.RequestHandler</a>:<br>
<dl><dt><a name="OAuth2Handler-delete"><strong>delete</strong></a>(self, *args)</dt><dd><tt>Handler&nbsp;method&nbsp;for&nbsp;DELETE&nbsp;requests.</tt></dd></dl>

<dl><dt><a name="OAuth2Handler-error"><strong>error</strong></a>(self, code)</dt><dd><tt>Clears&nbsp;the&nbsp;response&nbsp;output&nbsp;stream&nbsp;and&nbsp;sets&nbsp;the&nbsp;given&nbsp;HTTP&nbsp;error&nbsp;code.<br>
&nbsp;<br>
Args:<br>
&nbsp;&nbsp;code:&nbsp;the&nbsp;HTTP&nbsp;status&nbsp;error&nbsp;code&nbsp;(e.g.,&nbsp;501)</tt></dd></dl>

<dl><dt><a name="OAuth2Handler-handle_exception"><strong>handle_exception</strong></a>(self, exception, debug_mode)</dt><dd><tt>Called&nbsp;if&nbsp;this&nbsp;handler&nbsp;throws&nbsp;an&nbsp;exception&nbsp;during&nbsp;execution.<br>
&nbsp;<br>
The&nbsp;default&nbsp;behavior&nbsp;is&nbsp;to&nbsp;call&nbsp;<a href="#OAuth2Handler-error">error</a>(500)&nbsp;and&nbsp;print&nbsp;a&nbsp;stack&nbsp;trace<br>
if&nbsp;debug_mode&nbsp;is&nbsp;True.<br>
&nbsp;<br>
Args:<br>
&nbsp;&nbsp;exception:&nbsp;the&nbsp;exception&nbsp;that&nbsp;was&nbsp;thrown<br>
&nbsp;&nbsp;debug_mode:&nbsp;True&nbsp;if&nbsp;the&nbsp;web&nbsp;application&nbsp;is&nbsp;running&nbsp;in&nbsp;debug&nbsp;mode</tt></dd></dl>

<dl><dt><a name="OAuth2Handler-head"><strong>head</strong></a>(self, *args)</dt><dd><tt>Handler&nbsp;method&nbsp;for&nbsp;HEAD&nbsp;requests.</tt></dd></dl>

<dl><dt><a name="OAuth2Handler-initialize"><strong>initialize</strong></a>(self, request, response)</dt><dd><tt>Initializes&nbsp;this&nbsp;request&nbsp;handler&nbsp;with&nbsp;the&nbsp;given&nbsp;Request&nbsp;and&nbsp;Response.</tt></dd></dl>

<dl><dt><a name="OAuth2Handler-options"><strong>options</strong></a>(self, *args)</dt><dd><tt>Handler&nbsp;method&nbsp;for&nbsp;OPTIONS&nbsp;requests.</tt></dd></dl>

<dl><dt><a name="OAuth2Handler-post"><strong>post</strong></a>(self, *args)</dt><dd><tt>Handler&nbsp;method&nbsp;for&nbsp;POST&nbsp;requests.</tt></dd></dl>

<dl><dt><a name="OAuth2Handler-put"><strong>put</strong></a>(self, *args)</dt><dd><tt>Handler&nbsp;method&nbsp;for&nbsp;PUT&nbsp;requests.</tt></dd></dl>

<dl><dt><a name="OAuth2Handler-redirect"><strong>redirect</strong></a>(self, uri, permanent<font color="#909090">=False</font>)</dt><dd><tt>Issues&nbsp;an&nbsp;HTTP&nbsp;redirect&nbsp;to&nbsp;the&nbsp;given&nbsp;relative&nbsp;URL.<br>
&nbsp;<br>
Args:<br>
&nbsp;&nbsp;uri:&nbsp;a&nbsp;relative&nbsp;or&nbsp;absolute&nbsp;URI&nbsp;(e.g.,&nbsp;'../flowers.html')<br>
&nbsp;&nbsp;permanent:&nbsp;if&nbsp;true,&nbsp;we&nbsp;use&nbsp;a&nbsp;301&nbsp;redirect&nbsp;instead&nbsp;of&nbsp;a&nbsp;302&nbsp;redirect</tt></dd></dl>

<dl><dt><a name="OAuth2Handler-trace"><strong>trace</strong></a>(self, *args)</dt><dd><tt>Handler&nbsp;method&nbsp;for&nbsp;TRACE&nbsp;requests.</tt></dd></dl>

<hr>
Class methods inherited from <a href="google.appengine.ext.webapp._webapp25.html#RequestHandler">google.appengine.ext.webapp._webapp25.RequestHandler</a>:<br>
<dl><dt><a name="OAuth2Handler-get_url"><strong>get_url</strong></a>(cls, *args, **kargs)<font color="#909090"><font face="helvetica, arial"> from <a href="__builtin__.html#type">__builtin__.type</a></font></font></dt><dd><tt>Returns&nbsp;the&nbsp;url&nbsp;for&nbsp;the&nbsp;given&nbsp;handler.<br>
&nbsp;<br>
The&nbsp;default&nbsp;implementation&nbsp;uses&nbsp;the&nbsp;patterns&nbsp;passed&nbsp;to&nbsp;the&nbsp;active<br>
WSGIApplication&nbsp;to&nbsp;create&nbsp;a&nbsp;url.&nbsp;However,&nbsp;it&nbsp;is&nbsp;different&nbsp;from&nbsp;Django's<br>
urlresolvers.reverse()&nbsp;in&nbsp;the&nbsp;following&nbsp;ways:<br>
&nbsp;&nbsp;-&nbsp;It&nbsp;does&nbsp;not&nbsp;try&nbsp;to&nbsp;resolve&nbsp;handlers&nbsp;via&nbsp;module&nbsp;loading<br>
&nbsp;&nbsp;-&nbsp;It&nbsp;does&nbsp;not&nbsp;support&nbsp;named&nbsp;arguments<br>
&nbsp;&nbsp;-&nbsp;It&nbsp;performs&nbsp;some&nbsp;post-prosessing&nbsp;on&nbsp;the&nbsp;url&nbsp;to&nbsp;remove&nbsp;some&nbsp;regex<br>
&nbsp;&nbsp;&nbsp;&nbsp;operators.<br>
&nbsp;&nbsp;-&nbsp;It&nbsp;will&nbsp;try&nbsp;to&nbsp;fill&nbsp;in&nbsp;the&nbsp;left-most&nbsp;missing&nbsp;arguments&nbsp;with&nbsp;the&nbsp;args<br>
&nbsp;&nbsp;&nbsp;&nbsp;used&nbsp;in&nbsp;the&nbsp;active&nbsp;request.<br>
&nbsp;<br>
Args:<br>
&nbsp;&nbsp;args:&nbsp;Parameters&nbsp;for&nbsp;the&nbsp;url&nbsp;pattern's&nbsp;groups.<br>
&nbsp;&nbsp;kwargs:&nbsp;Optionally&nbsp;contains&nbsp;'implicit_args'&nbsp;that&nbsp;can&nbsp;either&nbsp;be&nbsp;a&nbsp;boolean<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;or&nbsp;a&nbsp;tuple.&nbsp;When&nbsp;it&nbsp;is&nbsp;True,&nbsp;it&nbsp;will&nbsp;use&nbsp;the&nbsp;arguments&nbsp;to&nbsp;the<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;active&nbsp;request&nbsp;as&nbsp;implicit&nbsp;arguments.&nbsp;When&nbsp;it&nbsp;is&nbsp;False&nbsp;(default),<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;it&nbsp;will&nbsp;not&nbsp;use&nbsp;any&nbsp;implicit&nbsp;arguments.&nbsp;When&nbsp;it&nbsp;is&nbsp;a&nbsp;tuple,&nbsp;it<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;will&nbsp;use&nbsp;the&nbsp;tuple&nbsp;as&nbsp;the&nbsp;implicit&nbsp;arguments.<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;the&nbsp;left-most&nbsp;args&nbsp;if&nbsp;some&nbsp;are&nbsp;missing&nbsp;from&nbsp;args.<br>
&nbsp;<br>
Returns:<br>
&nbsp;&nbsp;The&nbsp;url&nbsp;for&nbsp;this&nbsp;handler/args&nbsp;combination.<br>
&nbsp;<br>
Raises:<br>
&nbsp;&nbsp;NoUrlFoundError:&nbsp;No&nbsp;url&nbsp;pattern&nbsp;for&nbsp;this&nbsp;handler&nbsp;has&nbsp;the&nbsp;same<br>
&nbsp;&nbsp;&nbsp;&nbsp;number&nbsp;of&nbsp;args&nbsp;that&nbsp;were&nbsp;passed&nbsp;in.</tt></dd></dl>

<dl><dt><a name="OAuth2Handler-new_factory"><strong>new_factory</strong></a>(cls, *args, **kwargs)<font color="#909090"><font face="helvetica, arial"> from <a href="__builtin__.html#type">__builtin__.type</a></font></font></dt><dd><tt>Create&nbsp;new&nbsp;request&nbsp;handler&nbsp;factory.<br>
&nbsp;<br>
Use&nbsp;factory&nbsp;method&nbsp;to&nbsp;create&nbsp;reusable&nbsp;request&nbsp;handlers&nbsp;that&nbsp;just<br>
require&nbsp;a&nbsp;few&nbsp;configuration&nbsp;parameters&nbsp;to&nbsp;construct.&nbsp;&nbsp;Also&nbsp;useful<br>
for&nbsp;injecting&nbsp;shared&nbsp;state&nbsp;between&nbsp;multiple&nbsp;request&nbsp;handler<br>
instances&nbsp;without&nbsp;relying&nbsp;on&nbsp;global&nbsp;variables.&nbsp;&nbsp;For&nbsp;example,&nbsp;to<br>
create&nbsp;a&nbsp;set&nbsp;of&nbsp;post&nbsp;handlers&nbsp;that&nbsp;will&nbsp;do&nbsp;simple&nbsp;text&nbsp;transformations<br>
you&nbsp;can&nbsp;write:<br>
&nbsp;<br>
&nbsp;&nbsp;class&nbsp;ChangeTextHandler(webapp.<a href="google.appengine.ext.webapp._webapp25.html#RequestHandler">RequestHandler</a>):<br>
&nbsp;<br>
&nbsp;&nbsp;&nbsp;&nbsp;def&nbsp;<a href="#OAuth2Handler-__init__">__init__</a>(self,&nbsp;transform):<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;self.<strong>transform</strong>&nbsp;=&nbsp;transform<br>
&nbsp;<br>
&nbsp;&nbsp;&nbsp;&nbsp;def&nbsp;<a href="#OAuth2Handler-post">post</a>(self):<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;response_text&nbsp;=&nbsp;transform(<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;self.<strong>request</strong>.request.body_file.getvalue())<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;self.<strong>response</strong>.out.write(response_text)<br>
&nbsp;<br>
&nbsp;&nbsp;application&nbsp;=&nbsp;webapp.WSGIApplication(<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[('/to_lower',&nbsp;ChangeTextHandler.<a href="#OAuth2Handler-new_factory">new_factory</a>(str.lower)),<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;('/to_upper',&nbsp;ChangeTextHandler.<a href="#OAuth2Handler-new_factory">new_factory</a>(str.upper)),<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;],<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;debug=True)<br>
&nbsp;<br>
Text&nbsp;POSTed&nbsp;to&nbsp;/to_lower&nbsp;will&nbsp;be&nbsp;lower&nbsp;cased.<br>
Text&nbsp;POSTed&nbsp;to&nbsp;/to_upper&nbsp;will&nbsp;be&nbsp;upper&nbsp;cased.</tt></dd></dl>

<hr>
Data descriptors inherited from <a href="google.appengine.ext.webapp._webapp25.html#RequestHandler">google.appengine.ext.webapp._webapp25.RequestHandler</a>:<br>
<dl><dt><strong>__dict__</strong></dt>
<dd><tt>dictionary&nbsp;for&nbsp;instance&nbsp;variables&nbsp;(if&nbsp;defined)</tt></dd>
</dl>
<dl><dt><strong>__weakref__</strong></dt>
<dd><tt>list&nbsp;of&nbsp;weak&nbsp;references&nbsp;to&nbsp;the&nbsp;object&nbsp;(if&nbsp;defined)</tt></dd>
</dl>
</td></tr></table> <p>
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
<tr bgcolor="#ffc8d8">
<td colspan=3 valign=bottom>&nbsp;<br>
<font color="#000000" face="helvetica, arial"><a name="StorageByKeyName">class <strong>StorageByKeyName</strong></a>(<a href="oauth2client.client.html#Storage">oauth2client.client.Storage</a>)</font></td></tr>
    
<tr bgcolor="#ffc8d8"><td rowspan=2><tt>&nbsp;&nbsp;&nbsp;</tt></td>
<td colspan=2><tt>Store&nbsp;and&nbsp;retrieve&nbsp;a&nbsp;single&nbsp;credential&nbsp;to&nbsp;and&nbsp;from<br>
the&nbsp;App&nbsp;Engine&nbsp;datastore.<br>
&nbsp;<br>
This&nbsp;<a href="oauth2client.client.html#Storage">Storage</a>&nbsp;helper&nbsp;presumes&nbsp;the&nbsp;Credentials<br>
have&nbsp;been&nbsp;stored&nbsp;as&nbsp;a&nbsp;CredenialsProperty<br>
on&nbsp;a&nbsp;datastore&nbsp;model&nbsp;class,&nbsp;and&nbsp;that&nbsp;entities<br>
are&nbsp;stored&nbsp;by&nbsp;key_name.<br>&nbsp;</tt></td></tr>
<tr><td>&nbsp;</td>
<td width="100%"><dl><dt>Method resolution order:</dt>
<dd><a href="oauth2client.appengine.html#StorageByKeyName">StorageByKeyName</a></dd>
<dd><a href="oauth2client.client.html#Storage">oauth2client.client.Storage</a></dd>
<dd><a href="__builtin__.html#object">__builtin__.object</a></dd>
</dl>
<hr>
Methods defined here:<br>
<dl><dt><a name="StorageByKeyName-__init__"><strong>__init__</strong></a>(self, model, key_name, property_name, cache<font color="#909090">=None</font>)</dt><dd><tt>Constructor&nbsp;for&nbsp;<a href="oauth2client.client.html#Storage">Storage</a>.<br>
&nbsp;<br>
Args:<br>
&nbsp;&nbsp;model:&nbsp;db.<a href="google.appengine.ext.db.html#Model">Model</a>,&nbsp;model&nbsp;class<br>
&nbsp;&nbsp;key_name:&nbsp;string,&nbsp;key&nbsp;name&nbsp;for&nbsp;the&nbsp;entity&nbsp;that&nbsp;has&nbsp;the&nbsp;credentials<br>
&nbsp;&nbsp;property_name:&nbsp;string,&nbsp;name&nbsp;of&nbsp;the&nbsp;property&nbsp;that&nbsp;is&nbsp;a&nbsp;<a href="#CredentialsProperty">CredentialsProperty</a><br>
&nbsp;&nbsp;cache:&nbsp;memcache,&nbsp;a&nbsp;write-through&nbsp;cache&nbsp;to&nbsp;put&nbsp;in&nbsp;front&nbsp;of&nbsp;the&nbsp;datastore</tt></dd></dl>

<dl><dt><a name="StorageByKeyName-locked_delete"><strong>locked_delete</strong></a>(self)</dt><dd><tt>Delete&nbsp;Credential&nbsp;from&nbsp;datastore.</tt></dd></dl>

<dl><dt><a name="StorageByKeyName-locked_get"><strong>locked_get</strong></a>(self)</dt><dd><tt>Retrieve&nbsp;Credential&nbsp;from&nbsp;datastore.<br>
&nbsp;<br>
Returns:<br>
&nbsp;&nbsp;oauth2client.Credentials</tt></dd></dl>

<dl><dt><a name="StorageByKeyName-locked_put"><strong>locked_put</strong></a>(self, credentials)</dt><dd><tt>Write&nbsp;a&nbsp;Credentials&nbsp;to&nbsp;the&nbsp;datastore.<br>
&nbsp;<br>
Args:<br>
&nbsp;&nbsp;credentials:&nbsp;Credentials,&nbsp;the&nbsp;credentials&nbsp;to&nbsp;store.</tt></dd></dl>

<hr>
Methods inherited from <a href="oauth2client.client.html#Storage">oauth2client.client.Storage</a>:<br>
<dl><dt><a name="StorageByKeyName-acquire_lock"><strong>acquire_lock</strong></a>(self)</dt><dd><tt>Acquires&nbsp;any&nbsp;lock&nbsp;necessary&nbsp;to&nbsp;access&nbsp;this&nbsp;<a href="oauth2client.client.html#Storage">Storage</a>.<br>
&nbsp;<br>
This&nbsp;lock&nbsp;is&nbsp;not&nbsp;reentrant.</tt></dd></dl>

<dl><dt><a name="StorageByKeyName-delete"><strong>delete</strong></a>(self)</dt><dd><tt>Delete&nbsp;credential.<br>
&nbsp;<br>
Frees&nbsp;any&nbsp;resources&nbsp;associated&nbsp;with&nbsp;storing&nbsp;the&nbsp;credential.<br>
The&nbsp;<a href="oauth2client.client.html#Storage">Storage</a>&nbsp;lock&nbsp;must&nbsp;*not*&nbsp;be&nbsp;held&nbsp;when&nbsp;this&nbsp;is&nbsp;called.<br>
&nbsp;<br>
Returns:<br>
&nbsp;&nbsp;None</tt></dd></dl>

<dl><dt><a name="StorageByKeyName-get"><strong>get</strong></a>(self)</dt><dd><tt>Retrieve&nbsp;credential.<br>
&nbsp;<br>
The&nbsp;<a href="oauth2client.client.html#Storage">Storage</a>&nbsp;lock&nbsp;must&nbsp;*not*&nbsp;be&nbsp;held&nbsp;when&nbsp;this&nbsp;is&nbsp;called.<br>
&nbsp;<br>
Returns:<br>
&nbsp;&nbsp;oauth2client.client.Credentials</tt></dd></dl>

<dl><dt><a name="StorageByKeyName-put"><strong>put</strong></a>(self, credentials)</dt><dd><tt>Write&nbsp;a&nbsp;credential.<br>
&nbsp;<br>
The&nbsp;<a href="oauth2client.client.html#Storage">Storage</a>&nbsp;lock&nbsp;must&nbsp;be&nbsp;held&nbsp;when&nbsp;this&nbsp;is&nbsp;called.<br>
&nbsp;<br>
Args:<br>
&nbsp;&nbsp;credentials:&nbsp;Credentials,&nbsp;the&nbsp;credentials&nbsp;to&nbsp;store.</tt></dd></dl>

<dl><dt><a name="StorageByKeyName-release_lock"><strong>release_lock</strong></a>(self)</dt><dd><tt>Release&nbsp;the&nbsp;<a href="oauth2client.client.html#Storage">Storage</a>&nbsp;lock.<br>
&nbsp;<br>
Trying&nbsp;to&nbsp;release&nbsp;a&nbsp;lock&nbsp;that&nbsp;isn't&nbsp;held&nbsp;will&nbsp;result&nbsp;in&nbsp;a<br>
RuntimeError.</tt></dd></dl>

<hr>
Data descriptors inherited from <a href="oauth2client.client.html#Storage">oauth2client.client.Storage</a>:<br>
<dl><dt><strong>__dict__</strong></dt>
<dd><tt>dictionary&nbsp;for&nbsp;instance&nbsp;variables&nbsp;(if&nbsp;defined)</tt></dd>
</dl>
<dl><dt><strong>__weakref__</strong></dt>
<dd><tt>list&nbsp;of&nbsp;weak&nbsp;references&nbsp;to&nbsp;the&nbsp;object&nbsp;(if&nbsp;defined)</tt></dd>
</dl>
</td></tr></table></td></tr></table><p>
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
<tr bgcolor="#eeaa77">
<td colspan=3 valign=bottom>&nbsp;<br>
<font color="#ffffff" face="helvetica, arial"><big><strong>Functions</strong></big></font></td></tr>
    
<tr><td bgcolor="#eeaa77"><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</tt></td><td>&nbsp;</td>
<td width="100%"><dl><dt><a name="-main"><strong>main</strong></a>()</dt></dl>
 <dl><dt><a name="-oauth2decorator_from_clientsecrets"><strong>oauth2decorator_from_clientsecrets</strong></a>(filename, scope, message<font color="#909090">=None</font>)</dt><dd><tt>Creates&nbsp;an&nbsp;<a href="#OAuth2Decorator">OAuth2Decorator</a>&nbsp;populated&nbsp;from&nbsp;a&nbsp;clientsecrets&nbsp;file.<br>
&nbsp;<br>
Args:<br>
&nbsp;&nbsp;filename:&nbsp;string,&nbsp;File&nbsp;name&nbsp;of&nbsp;client&nbsp;secrets.<br>
&nbsp;&nbsp;scope:&nbsp;string&nbsp;or&nbsp;list&nbsp;of&nbsp;strings,&nbsp;scope(s)&nbsp;of&nbsp;the&nbsp;credentials&nbsp;being<br>
&nbsp;&nbsp;&nbsp;&nbsp;requested.<br>
&nbsp;&nbsp;message:&nbsp;string,&nbsp;A&nbsp;friendly&nbsp;string&nbsp;to&nbsp;display&nbsp;to&nbsp;the&nbsp;user&nbsp;if&nbsp;the<br>
&nbsp;&nbsp;&nbsp;&nbsp;clientsecrets&nbsp;file&nbsp;is&nbsp;missing&nbsp;or&nbsp;invalid.&nbsp;The&nbsp;message&nbsp;may&nbsp;contain&nbsp;HTML&nbsp;and<br>
&nbsp;&nbsp;&nbsp;&nbsp;will&nbsp;be&nbsp;presented&nbsp;on&nbsp;the&nbsp;web&nbsp;interface&nbsp;for&nbsp;any&nbsp;method&nbsp;that&nbsp;uses&nbsp;the<br>
&nbsp;&nbsp;&nbsp;&nbsp;decorator.<br>
&nbsp;<br>
Returns:&nbsp;An&nbsp;<a href="#OAuth2Decorator">OAuth2Decorator</a></tt></dd></dl>
</td></tr></table><p>
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
<tr bgcolor="#55aa55">
<td colspan=3 valign=bottom>&nbsp;<br>
<font color="#ffffff" face="helvetica, arial"><big><strong>Data</strong></big></font></td></tr>
    
<tr><td bgcolor="#55aa55"><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</tt></td><td>&nbsp;</td>
<td width="100%"><strong>OAUTH2CLIENT_NAMESPACE</strong> = 'oauth2client#ns'<br>
<strong>__author__</strong> = 'jcgregorio@google.com (Joe Gregorio)'<br>
<strong>application</strong> = &lt;google.appengine.ext.webapp._webapp25.WSGIApplication object&gt;</td></tr></table><p>
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
<tr bgcolor="#7799ee">
<td colspan=3 valign=bottom>&nbsp;<br>
<font color="#ffffff" face="helvetica, arial"><big><strong>Author</strong></big></font></td></tr>
    
<tr><td bgcolor="#7799ee"><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</tt></td><td>&nbsp;</td>
<td width="100%">jcgregorio@google.com&nbsp;(Joe&nbsp;Gregorio)</td></tr></table>
</body></html>